Trying to add fade multiplier to TextMeshPro shader

Hi there,

I’m just trying to add a fade multiplier value to the text mesh pro shader but I’ve been hitting a wall.
Basically I just want to add something to the end like this but I can’t seem to add the fadeValue variable without getting an undeclared identifier error.
return faceColor * (input.color.a*fadeValue);

I’ve had a little to do with shaders but I can’t figure out what Im doing wrong.

any ideas?
Thanks!
Pete

If you are adding a new property to the shader, it needs to be declared in the shader as well.

In the case of the properties used by the TMP shaders, this is defined in the common TMPro_Properties.cginc. In your case, you can / should define it in your shader itself.

Thanks @Stephan_B !