diff options
author | Juan Linietsky <reduzio@gmail.com> | 2021-06-12 22:01:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-12 22:01:44 -0300 |
commit | ccaefbce551fe6c1a0016b2f0407b6323ab8c601 (patch) | |
tree | 743bde5d283d8d4d9ecfa68fbdc0753355d16924 /servers/rendering | |
parent | bb9434493747f6c1f57c98cfe2964ce68f7d04cc (diff) | |
parent | ce783689f800732d036240fb0e4e98b647bb9ea8 (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.glsl | 2 |
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); |