I have a simple shader that uses a transparent CG lambert surface and I cant get the fog to cover that surface (when running) even when the alpha is 1. It works/looks fine in the editor but when I run the program ('Play' in the editor) it will not fog over.
I just want the default fog to work/look the same as it does when in editor/scene mode.
I am not setting anything specific for fog in the shader itself. I tried "#pragma fragmentoption ARB_fog_exp2" but I get a warning 'CGPROGRAM block does not contain a fragment program'. ( I guess a surface is not considered a fragment? Im just learning CG/Shaders so Im guessing..) I tried setting Fog mode exp2 (outside the CGPROGAM to make sure fog was on) but it did not make any difference.
I am not using anything CG specific for a vertex or fragment, just the surface.
The fog is turned on and works everyplace else except for over this surface. (and even then it looks fine in the editor but not running)
Do I need to include/define/use vertex fragments to include fog? Or am I missing something? It seems strange that it works in the editor but not playing.
Update: It appears the problem is related to setting the "Queue"="Transparent" in the Tags. If I remove this fog seems to work. (Note this seems to be the case with Unity's Transparent Bumped Diffuse shader too. )But the problem is then I have troubles with render order for overlapping semi transparent objects. (I have multiple transparent queues in use)
If I dont specify "Queue"="Transparent+50" (or even the base "Queue"="Transparent") is it still rendered in the transparent queue? Or how can i now specify both the render queue and get fog?
Thanks for any help