Skip to content

Commit

Permalink
Nodes: consume labels() when used, to prevent duplicate uniform names. (
Browse files Browse the repository at this point in the history
#26822)

Co-authored-by: aardgoose <angus.sawyer@email.com>
  • Loading branch information
aardgoose and aardgoose committed Sep 22, 2023
1 parent 5bab962 commit aa7bec9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/jsm/nodes/core/UniformNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class UniformNode extends InputNode {
const nodeUniform = builder.getUniformFromNode( sharedNode, sharedNodeType, builder.shaderStage, builder.context.label );
const propertyName = builder.getPropertyName( nodeUniform );

if ( builder.context.label !== undefined ) delete builder.context.label;

return builder.format( propertyName, type, output );

}
Expand Down

0 comments on commit aa7bec9

Please sign in to comment.