You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Various fixes for transmittance effect
Use correct shadow sampling for omni and spot lights Disable transmittance if shadows are disabled Correct DirectionalLight transmittance bias to match shadow bias (its still pretty sensitive though)
This commit is contained in:
@@ -1983,7 +1983,7 @@ void fragment_shader(in SceneData scene_data) {
|
||||
|
||||
#ifdef LIGHT_TRANSMITTANCE_USED
|
||||
float transmittance_z = transmittance_depth;
|
||||
|
||||
#ifndef SHADOWS_DISABLED
|
||||
if (directional_lights.data[i].shadow_opacity > 0.001) {
|
||||
float depth_z = -vertex.z;
|
||||
|
||||
@@ -2030,7 +2030,8 @@ void fragment_shader(in SceneData scene_data) {
|
||||
transmittance_z = z - shadow_z;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif // !SHADOWS_DISABLED
|
||||
#endif // LIGHT_TRANSMITTANCE_USED
|
||||
|
||||
float shadow = 1.0;
|
||||
#ifndef SHADOWS_DISABLED
|
||||
|
||||
Reference in New Issue
Block a user