summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorBastiaan Olij <mux213@gmail.com>2022-10-28 12:31:39 +1100
committerGitHub <noreply@github.com>2022-10-28 12:31:39 +1100
commit6a61d22ce7373cdc45a0f2eae84d5742a3c9be73 (patch)
tree7e4a16c9b0440cfb8cebfd746c268dcdf7546e28 /servers/rendering
parent0486810697f8c22b190dd18e8d72ac18ef0664c3 (diff)
parent31c1a06ab5ddb4189066ddc2b6449b9ed1cde16c (diff)
Merge pull request #67960 from clayjohn/RD-SSIL
Fix ss_effects_flags uniform in clustered forward renderer
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl5
1 files changed, 4 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
index 77ae97e621..293532bf2d 100644
--- a/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
+++ b/servers/rendering/renderer_rd/shaders/forward_clustered/scene_forward_clustered.glsl
@@ -1454,7 +1454,7 @@ void fragment_shader(in SceneData scene_data) {
ambient_light *= albedo.rgb;
ambient_light *= ao;
- if (bool(scene_data.ss_effects_flags & SCREEN_SPACE_EFFECTS_FLAGS_USE_SSIL)) {
+ if (bool(implementation_data.ss_effects_flags & SCREEN_SPACE_EFFECTS_FLAGS_USE_SSIL)) {
vec4 ssil = textureLod(sampler2D(ssil_buffer, material_samplers[SAMPLER_LINEAR_CLAMP]), screen_uv, 0.0);
ambient_light *= 1.0 - ssil.a;
ambient_light += ssil.rgb * albedo.rgb;
@@ -1462,6 +1462,9 @@ void fragment_shader(in SceneData scene_data) {
#endif // AMBIENT_LIGHT_DISABLED
}
+ // convert ao to direct light ao
+ ao = mix(1.0, ao, ao_light_affect);
+
//this saves some VGPRs
vec3 f0 = F0(metallic, specular, albedo);