0
Planned

SF should throw errors and prevent compilation when you are using reserved or duplicate node property names

elliot.bentine 4 years ago • updated by Joachim Holmér (Developer) 4 years ago 2
Admin edit: Original title: Duplicate node names causes an error
Original post below:
I have two texture 2d samplers that use the same texture, so I tried to use the same variable name between both of them (for example, a color ramp). From a design point of view, I only want to assign a texture once and it will be used everywhere in the shader for this, despite being sampled multiple times. Is there a way to achieve this? Using two sampler 2ds with the same name causes an error.

Cheers!


Sampling a single texture multiple times is a feature already implemented in the upcoming alpha 0.14 :)

http://www.acegikmo.com/shaderforge/images/Misc/Animated/shaderforge_textureasset_uv.gif


The true problem though, is duplicate node names. SF should definitely let you know that you can't use the same name for different properties, after which it should prevent the shader from compiling and point to the error until you've sorted it out. I'll rename the title :)

Many thanks for your prompt response!