summaryrefslogtreecommitdiff
path: root/servers/visual/rasterizer_rd/shaders/scene_high_end.glsl
diff options
context:
space:
mode:
Diffstat (limited to 'servers/visual/rasterizer_rd/shaders/scene_high_end.glsl')
-rw-r--r--servers/visual/rasterizer_rd/shaders/scene_high_end.glsl8
1 files changed, 8 insertions, 0 deletions
diff --git a/servers/visual/rasterizer_rd/shaders/scene_high_end.glsl b/servers/visual/rasterizer_rd/shaders/scene_high_end.glsl
index 66ce4b466f..8aee680c1e 100644
--- a/servers/visual/rasterizer_rd/shaders/scene_high_end.glsl
+++ b/servers/visual/rasterizer_rd/shaders/scene_high_end.glsl
@@ -1272,6 +1272,7 @@ FRAGMENT_SHADER_CODE
#endif // !USE_SHADOW_TO_OPACITY
+
#if defined(NORMALMAP_USED)
normalmap.xy = normalmap.xy * 2.0 - 1.0;
@@ -1310,6 +1311,13 @@ FRAGMENT_SHADER_CODE
#if !defined(MODE_RENDER_DEPTH) && !defined(MODE_UNSHADED)
+ if (scene_data.roughness_limiter_enabled) {
+ float limit = texelFetch(sampler2D(roughness_buffer, material_samplers[SAMPLER_NEAREST_CLAMP]),ivec2(gl_FragCoord.xy),0).r;
+ roughness = max(roughness,limit);
+
+ }
+
+
if (scene_data.use_reflection_cubemap) {
vec3 ref_vec = reflect(-view, normal);