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>2022-06-29 12:35:36 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-06-29 15:12:03 +0300
commit4a9f60ecd291254ad32854b945c673dfc1e12137 (patch)
treef4116634aadc8c668ee5a132bf2a04285da6d611 /source/blender/nodes/shader/node_shader_tree.cc
parent40f40e9931a6bd93710171a8d8182095120f2926 (diff)
Fix T99104: EEVEE: Regression: Crash when using Light Output in Materials
Using Light output is supported in Cycles. This patch adds support for it and remove the crash in `ntree_shader_weight_tree_invert()` by treating it as any other outputs. Candidate for 3.2.1 corrective release.
Diffstat (limited to 'source/blender/nodes/shader/node_shader_tree.cc')
-rw-r--r--source/blender/nodes/shader/node_shader_tree.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/nodes/shader/node_shader_tree.cc b/source/blender/nodes/shader/node_shader_tree.cc
index 24558e4b32b..43dbf5060bd 100644
--- a/source/blender/nodes/shader/node_shader_tree.cc
+++ b/source/blender/nodes/shader/node_shader_tree.cc
@@ -712,6 +712,7 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node
switch (node->type) {
case SH_NODE_SHADERTORGB:
+ case SH_NODE_OUTPUT_LIGHT:
case SH_NODE_OUTPUT_WORLD:
case SH_NODE_OUTPUT_MATERIAL: {
/* Start the tree with full weight. */
@@ -810,6 +811,7 @@ static void ntree_shader_weight_tree_invert(bNodeTree *ntree, bNode *output_node
switch (node->type) {
case SH_NODE_SHADERTORGB:
+ case SH_NODE_OUTPUT_LIGHT:
case SH_NODE_OUTPUT_WORLD:
case SH_NODE_OUTPUT_MATERIAL:
case SH_NODE_ADD_SHADER: {