Eevee: Render: Fix Normals of refraction shader.

This commit is contained in:
Clément Foucault
2018-01-31 22:53:29 +01:00
parent 253b412ace
commit c95f3a3616

View File

@@ -2978,7 +2978,9 @@ void node_bsdf_refraction(vec4 color, float roughness, float ior, vec3 N, out Cl
color.rgb *= (refractionDepth > 0.0) ? color.rgb : vec3(1.0); /* Simulate 2 absorption event. */
roughness = sqrt(roughness);
eevee_closure_refraction(N, roughness, ior, out_refr);
vec3 vN = normalize(mat3(ViewMatrix) * N);
result = CLOSURE_DEFAULT;
result.ssr_normal = normal_encode(vN, viewCameraVec);
result.radiance = out_refr * color.rgb;
result.ssr_id = REFRACT_CLOSURE_FLAG;
#else