diff options
-rw-r--r-- | source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl | 7 | ||||
-rw-r--r-- | source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c | 9 |
2 files changed, 11 insertions, 5 deletions
diff --git a/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl b/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl index 8131958313b..ec49cc86761 100644 --- a/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl +++ b/source/blender/gpu/shaders/material/gpu_shader_material_anisotropic.glsl @@ -5,12 +5,13 @@ void node_bsdf_anisotropic(vec4 color, float rotation, vec3 N, vec3 T, - float use_multiscatter, + const float use_multiscatter, + const float ssr_id, out Closure result) { - node_bsdf_glossy(color, roughness, N, -1, use_multiscatter, result); + node_bsdf_glossy(color, roughness, N, use_multiscatter, ssr_id, result); } #else /* Stub anisotropic because it is not compatible with volumetrics. */ -# define node_bsdf_anisotropic(a, b, c, d, e, f, g, result) (result = CLOSURE_DEFAULT) +# define node_bsdf_anisotropic(a, b, c, d, e, f, g, h, result) (result = CLOSURE_DEFAULT) #endif diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c index 7ce085d2c82..499f62da683 100644 --- a/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c +++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_anisotropic.c @@ -55,8 +55,13 @@ static int node_shader_gpu_bsdf_anisotropic(GPUMaterial *mat, float use_multi_scatter = (node->custom1 == SHD_GLOSSY_MULTI_GGX) ? 1.0f : 0.0f; - return GPU_stack_link( - mat, node, "node_bsdf_anisotropic", in, out, GPU_constant(&use_multi_scatter)); + return GPU_stack_link(mat, + node, + "node_bsdf_anisotropic", + in, + out, + GPU_constant(&use_multi_scatter), + GPU_constant(&node->ssr_id)); } /* node type definition */ |