Make shader compiler again after roughness limiter fix

Fix shader compilation error after merging #49549
This commit is contained in:
reduz 2021-06-12 21:40:51 -03:00
parent bb94344937
commit ce783689f8
1 changed files with 1 additions and 1 deletions

View File

@ -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);