Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2021-02-13 21:08:16 +0300
committerClément Foucault <foucault.clem@gmail.com>2021-02-13 21:08:16 +0300
commit9e81e1c33f44d6d49956a220f6feaa51bf8cba7c (patch)
treede23028c5a839a36240a4980177126f777b65247 /source/blender
parentaaf1650b099393c4cdcf44faf8e3a699e021f817 (diff)
EEVEE: Fix glass with sharp distribution not ignoring roughness
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
index e0fcce6f617..5fc946e3509 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_glass.c
@@ -49,6 +49,10 @@ static int node_shader_gpu_bsdf_glass(GPUMaterial *mat,
GPU_link(mat, "world_normals_get", &in[3].link);
}
+ if (node->custom1 == SHD_GLOSSY_SHARP) {
+ GPU_link(mat, "set_value_zero", &in[1].link);
+ }
+
GPU_material_flag_set(mat, GPU_MATFLAG_GLOSSY | GPU_MATFLAG_REFRACT);
float use_multi_scatter = (node->custom1 == SHD_GLOSSY_MULTI_GGX) ? 1.0f : 0.0f;