Skip to content

Commit dbf4bef

Browse files
committed
Merge pull request #108728 from jcostello/88168-fix-lightaps-dynamic-objects-with-physical-lights
Fix lightmap dynamic objects with physical lights
2 parents b3c7beb + 5dc25db commit dbf4bef

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

drivers/gles3/shaders/scene.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ void main() {
21042104
c3 * lightmap_captures[6].rgb * (3.0 * wnormal.z * wnormal.z - 1.0) +
21052105
c2 * lightmap_captures[7].rgb * wnormal.x * wnormal.z +
21062106
c4 * lightmap_captures[8].rgb * (wnormal.x * wnormal.x - wnormal.y * wnormal.y)) *
2107-
scene_data.emissive_exposure_normalization;
2107+
scene_data.IBL_exposure_normalization;
21082108
}
21092109
#else
21102110
#ifdef USE_LIGHTMAP

servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1719,7 +1719,7 @@ void fragment_shader(in SceneData scene_data) {
17191719
c[3] * lightmap_captures.data[index].sh[6].rgb * (3.0 * wnormal.z * wnormal.z - 1.0) +
17201720
c[2] * lightmap_captures.data[index].sh[7].rgb * wnormal.x * wnormal.z +
17211721
c[4] * lightmap_captures.data[index].sh[8].rgb * (wnormal.x * wnormal.x - wnormal.y * wnormal.y)) *
1722-
scene_data.emissive_exposure_normalization;
1722+
scene_data.IBL_exposure_normalization;
17231723

17241724
} else if (bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_LIGHTMAP)) { // has actual lightmap
17251725
bool uses_sh = bool(instances.data[instance_index].flags & INSTANCE_FLAGS_USE_SH_LIGHTMAP);

servers/rendering/renderer_rd/shaders/forward_mobile/scene_forward_mobile.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1628,7 +1628,7 @@ void main() {
16281628
half(0.429043) // l2p2 sqrt(15.0/(16.0*PI))* PI*1.0/4.0
16291629
);
16301630

1631-
half norm = half(scene_data.emissive_exposure_normalization);
1631+
half norm = half(scene_data.IBL_exposure_normalization);
16321632
ambient_light += c[0] * hvec3(lightmap_captures.data[index].sh[0].rgb) * norm;
16331633
ambient_light += c[1] * hvec3(lightmap_captures.data[index].sh[1].rgb) * wnormal.y * norm;
16341634
ambient_light += c[1] * hvec3(lightmap_captures.data[index].sh[2].rgb) * wnormal.z * norm;

0 commit comments

Comments
 (0)