Closed
Description
Description
When using label()
or toVar()
to give variables a name, collisions can occur when the name is already reserved for internal entities like uniforms or varyings.
If you now redefine a variable on app level, a shader error occurs. In WGSL for example:
Error while parsing WGSL: :40:2 error: redefinition of 'cameraNear'
Solution
It would be nice if the node material could automatically detect such name collisions and modify the custom names e.g. with a suffix.
Alternatives
Leave it as it is and ask developers to pick unique names.