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>2019-03-25 22:36:31 +0300
committerClément Foucault <foucault.clem@gmail.com>2019-03-25 22:36:31 +0300
commite59a2fcc35ced809f61150bba2a00a7350eb04da (patch)
tree659aad53d6a26b919e9e79597978334e8de494f2 /source/blender/nodes
parentc602ec74fdd20c17c9ca9c7eb59c048443efc2ce (diff)
Fix T62856 Toon BSDF and viewport/UI oddities
This was caused by the material not tagged to use Diffuse lighting data.
Diffstat (limited to 'source/blender/nodes')
-rw-r--r--source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c b/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c
index ed706ca2ae1..de08f00b0b8 100644
--- a/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c
+++ b/source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c
@@ -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);
}