Fix interface input resolution in ShaderGen#2369
Conversation
|
@niklasharrysson, @jstone-lucasfilm I think both of you were involved in previous interface input resolve issues so pinging you first. |
| if (nodeInput) | ||
| { | ||
| ValuePtr value = nodeInput->getResolvedValue(); | ||
| if (!value) |
There was a problem hiding this comment.
Seems interface input values were not being checked at all on node instances.
| if (interfaceInput) | ||
| { | ||
| portValue = interfaceInput->getValue(); | ||
| portValue = interfaceInput->getResolvedValue(); |
There was a problem hiding this comment.
Interface inputs on nodedefs should get the resolved value.
Thanks Bernard, this looks like a good fix! |
|
Thanks @niklasharrysson , @jstone-lucasfilm let me know what you think. I would be nice to get this in as I think it |
jstone-lucasfilm
left a comment
There was a problem hiding this comment.
This change looks good to me, thanks @kwokcb!
ffc324b
into
AcademySoftwareFoundation:main
Issue
When a node is created in shader generation the incorrect values may be stored due to:
Notes
There were past fixes for proper meta-data passing such as colorspace / units and geometry stream bindings on interface inputs. This addresses the missing evaluation of resolved values.
Fix
Note that the logic for token resolution has not changed, it was just not being called for properly.
This helps with #2361 as now you can connect to downstream materials and have it show up. The node editor itself still has issues with switching between shaders to evaluate which is not present in the viewer. This just makes it so that it will switch and evaluation properly when you choose different downstream materials in the node editor and will evaluation connected material configs properly in the viewer (in general).
Test
Add a new variant for token resolution by adding downstream materials to the previous token test.
The previous test resolves properly for some cases if the interface inputs are at the nodegraph level of an unconnected output.
In order, parent, nodedef, top and sibling level token override tests.