summaryrefslogtreecommitdiff
path: root/servers/rendering
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2021-06-12 22:01:44 -0300
committerGitHub <noreply@github.com>2021-06-12 22:01:44 -0300
commitccaefbce551fe6c1a0016b2f0407b6323ab8c601 (patch)
tree743bde5d283d8d4d9ecfa68fbdc0753355d16924 /servers/rendering
parentbb9434493747f6c1f57c98cfe2964ce68f7d04cc (diff)
parentce783689f800732d036240fb0e4e98b647bb9ea8 (diff)
Merge pull request #49551 from reduz/fix-roughness-limiter2
Make shader compile again after roughness limiter fix
Diffstat (limited to 'servers/rendering')
-rw-r--r--servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl2
1 files changed, 1 insertions, 1 deletions
diff --git a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
index 945926d43d..ce02d5c4d0 100644
--- a/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
+++ b/servers/rendering/renderer_rd/shaders/scene_forward_clustered.glsl
@@ -850,7 +850,7 @@ void main() {
if (scene_data.roughness_limiter_enabled) {
//http://www.jp.square-enix.com/tech/library/pdf/ImprovedGeometricSpecularAA.pdf
float roughness2 = roughness * roughness;
- vec2 dndu = dFdx(normal), dndv = dFdy(normal);
+ vec3 dndu = dFdx(normal), dndv = dFdy(normal);
float variance = scene_data.roughness_limiter_amount * (dot(dndu, dndu) + dot(dndv, dndv));
float kernelRoughness2 = min(2.0 * variance, scene_data.roughness_limiter_limit); //limit effect
float filteredRoughness2 = min(1.0, roughness2 + kernelRoughness2);