Fix DirectionalLight3D shadow opacity on Forward Mobile rendering backend

This commit is contained in:
Hugo Locurcio 2023-01-19 19:40:28 +01:00
parent 14fdd28de9
commit d84c9523f7
No known key found for this signature in database
GPG key ID: 39E8F8BE30B0A49C
2 changed files with 3 additions and 1 deletions

View file

@ -1798,7 +1798,7 @@ void fragment_shader(in SceneData scene_data) {
shadow = float(shadow1 >> ((i - 4u) * 8u) & 0xFFu) / 255.0;
}
shadow = shadow * directional_lights.data[i].shadow_opacity + 1.0 - directional_lights.data[i].shadow_opacity;
shadow = mix(1.0, shadow, directional_lights.data[i].shadow_opacity);
#endif
blur_shadow(shadow);

View file

@ -1515,6 +1515,8 @@ void main() {
} else {
shadow = float(shadow1 >> ((i - 4) * 8) & 0xFF) / 255.0;
}
shadow = mix(1.0, shadow, directional_lights.data[i].shadow_opacity);
#endif
blur_shadow(shadow);