Hi, How can I go about making this material Unlit.
I have tried different things like “Lighting Off” and tried merging the existing Unlit shader but I don’t have much experience in writing shaders, so any help will be highly appriciated.
About the shader:
This shader takes 2 images:
Map 1: RGB (this is used for adding an additive decal to the second texture).
Map 2. RGBA (This is the main texture+transparency)
The whole point of surface shaders is that they handle lighting.
So the best option is to write a vertex/fragment shader. You could start by modifying Daniel Brauer’s example from the Unity3d wiki.
In those types of shaders, the output is indicated semantics. In this example, for the fragment shader it’s : COLOR, and it’s the float4 return value of the frag function. That output value contains both rgb and a.
You can leave the vertex shader as it is; it simply calculates the position of the vertex on screen, and the uv coordinates that vertex has.
[Edit] The easiest way to change it in a surface shader, by the way, is writing to .Emission in stead of Albedo. Emission is add after the rest of the lighting calculations. But as I explained above, if you’re not using the Albedo output, you might as well replace the surface shader entirely.
Figured that, that’s why I also suggested writing the vertex/fragment shader or the not proper custom lighting way. I tend to stay away from surface shaders and fixed function stuff, so I relied on an unity answer topic where the lighting off was suggested and was marked as answered.