- Home /
GlobalFog overwrites Toony/BasicOutline outline shader -- outlines become white
Hello,
My issue is that GlobalFog overwrites outline, no matter what distance the object is from the camera (near or far both get overwitten by globalfog.) This results in white outlines where the fog is present (ugh).
I've seen numerous issues and solutions about GlobalFog and transparency, none of which have solved my issue, including:
--Setting the depth of the outline shader above the fog shader using {"Queue"="Background" or "Queue"="Overlay"}
--Adding "#pragma multi_compile_fog to the shader which was recommended by Unity5's shader upgrade manual
--Adding "@ImageEffectOpaque" to the OnRender function in GlobalFog.js
--ZWrite is on in the outline shader (Toony/BasicOutline")
Nothing works! Help?
How can I force the fog to respect the z-distance of the outline? I have a feeling I can add something to one of the two shaders to fix this, but what?!