EEVEE: Fix glass with sharp distribution not ignoring roughness

This commit is contained in:
Clément Foucault 2021-02-13 19:08:16 +01:00
parent aaf1650b09
commit 9e81e1c33f
1 changed files with 4 additions and 0 deletions

View File

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