Fix T62856 Toon BSDF and viewport/UI oddities

This was caused by the material not tagged to use Diffuse lighting data.
This commit is contained in:
Clément Foucault 2019-03-25 20:36:31 +01:00
parent c602ec74fd
commit e59a2fcc35
Notes: blender-bot 2023-02-14 05:59:31 +01:00
Referenced by issue #62856, Toon BSDF and viewport/UI oddities
1 changed files with 3 additions and 3 deletions

View File

@ -37,9 +37,9 @@ static bNodeSocketTemplate sh_node_bsdf_toon_out[] = {
static int node_shader_gpu_bsdf_toon(GPUMaterial *mat, bNode *node, bNodeExecData *UNUSED(execdata), GPUNodeStack *in, GPUNodeStack *out)
{
if (!in[3].link)
in[3].link = GPU_builtin(GPU_VIEW_NORMAL);
else
GPU_link(mat, "direction_transform_m4v3", in[3].link, GPU_builtin(GPU_VIEW_MATRIX), &in[3].link);
GPU_link(mat, "world_normals_get", &in[3].link);
GPU_material_flag_set(mat, GPU_MATFLAG_DIFFUSE);
return GPU_stack_link(mat, node, "node_bsdf_toon", in, out);
}