diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2017-07-20 17:54:57 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2017-07-24 16:28:27 +0300 |
commit | 09413fad12c92fcd6c3410eadcdfc8f91bc028ef (patch) | |
tree | cddf8df0f521dbddb934bca1c2fd03f89b97b8d0 /source/blender/gpu/shaders | |
parent | babef873fc2aa2f4788a85f8a4461209fc218c70 (diff) |
Eevee: Fix glossy node roughness.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r-- | source/blender/gpu/shaders/gpu_shader_material.glsl | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_material.glsl b/source/blender/gpu/shaders/gpu_shader_material.glsl index bf4ce756bde..c2956011ffa 100644 --- a/source/blender/gpu/shaders/gpu_shader_material.glsl +++ b/source/blender/gpu/shaders/gpu_shader_material.glsl @@ -2686,6 +2686,7 @@ void node_bsdf_glossy(vec4 color, float roughness, vec3 N, float ssr_id, out Clo { #ifdef EEVEE_ENGINE vec3 ssr_spec; + roughness = sqrt(roughness); vec3 L = eevee_surface_glossy_lit(N, vec3(1.0), roughness, 1.0, int(ssr_id), ssr_spec); vec3 vN = normalize(mat3(ViewMatrix) * N); result = Closure(L * color.rgb, 1.0, vec4(ssr_spec * color.rgb, roughness), normal_encode(vN, viewCameraVec), int(ssr_id)); |