You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-12 13:20:55 +00:00
Fix DirectionalLight3D shadow opacity on Forward Mobile rendering backend
This commit is contained in:
@@ -1798,7 +1798,7 @@ void fragment_shader(in SceneData scene_data) {
|
|||||||
shadow = float(shadow1 >> ((i - 4u) * 8u) & 0xFFu) / 255.0;
|
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
|
#endif
|
||||||
|
|
||||||
blur_shadow(shadow);
|
blur_shadow(shadow);
|
||||||
|
|||||||
@@ -1515,6 +1515,8 @@ void main() {
|
|||||||
} else {
|
} else {
|
||||||
shadow = float(shadow1 >> ((i - 4) * 8) & 0xFF) / 255.0;
|
shadow = float(shadow1 >> ((i - 4) * 8) & 0xFF) / 255.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shadow = mix(1.0, shadow, directional_lights.data[i].shadow_opacity);
|
||||||
#endif
|
#endif
|
||||||
blur_shadow(shadow);
|
blur_shadow(shadow);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user