They say that in order for shaders to properly support Unity 5’s fog, you need to add the fog macros. The problem with this shader is that it has multiple textures. The guide only covers 1. The shader I’m using also has alpha channels that mask the other textures
Could someone steer me in the right direction on how to add fog support for a shader with multiple textures and alpha masking?
I’ve tried following the guide, but it doesn’t seem to work with this kind of shader. I’ve looked through every post using google and haven’t found a solution. Any help would be greatly appreciated. To mention, I’m not much of a shader programmer, but I’m trying to learn.
I believe it would be this portion of the shader where fog would be added.
Note: This only seems to be affected by Unity 5.2+
Yes, but not with Unity 5.2+. I’m not sure what has been updated since then, but it no longer works after I have updated. I checked the update notes for 5.2 and couldn’t find any major changes with fog.
Alright. Any idea how fog would be added to this? I double checked and it works with Unity 5.0 but not Unity 5.2. I’m not sure why though. Fog should be applied automatically to surface shaders.
Apart from that not being the entire shader (missing a few "}"s and an ENDCG), it gets properly fogged when I use it. I’m not seeing the problems you are.