[Bf-blender-cvs] [e59a2fcc35c] master: Fix T62856 Toon BSDF and viewport/UI oddities
Clément Foucault
noreply at git.blender.org
Mon Mar 25 20:36:46 CET 2019
Commit: e59a2fcc35ced809f61150bba2a00a7350eb04da
Author: Clément Foucault
Date: Mon Mar 25 20:36:31 2019 +0100
Branches: master
https://developer.blender.org/rBe59a2fcc35ced809f61150bba2a00a7350eb04da
Fix T62856 Toon BSDF and viewport/UI oddities
This was caused by the material not tagged to use Diffuse lighting data.
===================================================================
M source/blender/nodes/shader/nodes/node_shader_bsdf_toon.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list