Fix T44755 set_value node output in node tree not properly converted to
color in GLSL Issue here is that intermediate result was clipped as an optimization in such nodes and thus not converted to the correct type properly. Now only clip those values if types match. This keeps both the optimization and the conversion. I looked at converting uniform types always but it's more involved to compare types at conversion time for such links because the type was getting overridden during link duplication.
This commit is contained in:
parent
dc3533030a
commit
78411dc7d7
Notes:
blender-bot
2023-02-14 10:29:32 +01:00
Referenced by issue #44755, Difference between GLSL and BI render when Value node is connected to the Output node
|
@ -930,8 +930,11 @@ static void gpu_node_input_link(GPUNode *node, GPUNodeLink *link, const GPUType
|
|||
if (link->output) {
|
||||
outnode = link->output->node;
|
||||
name = outnode->name;
|
||||
input = outnode->inputs.first;
|
||||
|
||||
if (STREQ(name, "set_value") || STREQ(name, "set_rgb")) {
|
||||
if ((STREQ(name, "set_value") || STREQ(name, "set_rgb")) &&
|
||||
(input->type == type))
|
||||
{
|
||||
input = MEM_dupallocN(outnode->inputs.first);
|
||||
input->type = type;
|
||||
if (input->link)
|
||||
|
|
Loading…
Reference in New Issue