Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
2820b2d8
Commit
2820b2d8
authored
Jan 02, 2017
by
Juan Linietsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix stupid bug in light downscaling for GI Probe
parent
741e0386
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
visual_server_scene.cpp
servers/visual/visual_server_scene.cpp
+6
-3
No files found.
servers/visual/visual_server_scene.cpp
View file @
2820b2d8
...
...
@@ -2917,6 +2917,8 @@ void VisualServerScene::_bake_gi_downscale_light(int p_idx, int p_level, const G
p_local_data
[
p_idx
].
energy
[
1
]
=
0
;
p_local_data
[
p_idx
].
energy
[
2
]
=
0
;
int
divisor
=
0
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
uint32_t
child
=
p_cells
[
p_idx
].
children
[
i
];
...
...
@@ -2931,13 +2933,14 @@ void VisualServerScene::_bake_gi_downscale_light(int p_idx, int p_level, const G
p_local_data
[
p_idx
].
energy
[
0
]
+=
p_local_data
[
child
].
energy
[
0
];
p_local_data
[
p_idx
].
energy
[
1
]
+=
p_local_data
[
child
].
energy
[
1
];
p_local_data
[
p_idx
].
energy
[
2
]
+=
p_local_data
[
child
].
energy
[
2
];
divisor
++
;
}
//divide by eight for average
p_local_data
[
p_idx
].
energy
[
0
]
>>=
3
;
p_local_data
[
p_idx
].
energy
[
1
]
>>=
3
;
p_local_data
[
p_idx
].
energy
[
2
]
>>=
3
;
p_local_data
[
p_idx
].
energy
[
0
]
/=
divisor
;
p_local_data
[
p_idx
].
energy
[
1
]
/=
divisor
;
p_local_data
[
p_idx
].
energy
[
2
]
/=
divisor
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment