What are $UV .$CH?

What are $UV .$CH ? I understand they are used for as parameters for texture2d… however, how they are used, where are they defined, whats up with the dollar sign, are there other shader parameters with dollar signs we should know about…

Those are for convenience. You don’t have to use them and you can create your own attribute names in the shader definition when you create a material.

About $UV and $CH. You can think of them as placeholders for selected UV and color channels. The Editor allows you to select 2 UV channels and several Color Channels for each UV. When the shader will compile, those $UV.$CH will point to the actual values used in the Editor. This helps at times when you change the channel of a material property in the Editor. You don’t need to modify your shader attributes in the code - they will always point to the correct channel.

image image

3 Likes