FX/Glass/GlassStainedBumpDistort shader "removes" halo, and single pass stereo bug?

I’m using the standard (5.5.0f3) glass refraction shader “FX/Glass/Stained BumpDistort” in VR and noticed that halo’s on objects don’t render behind the glass. Ideally they would be rendered blurred along with the object. I’ve tried moving the material to a different render queue and a couple shot in the dark attempts at modifying the shader, none of which has showed the halo’s. One of those shot in the dark attempts was to comment out: “UNITY_APPLY_FOG(i.fogCoord, col);” in the frag(v2f i) function. Note that to get the shader to work in VR I added the recommended fix to the top of that same frag function: "
#if UNITY_SINGLE_PASS_STEREO
i.uvgrab.xy = TransformStereoScreenSpaceTex(i.uvgrab.xy, i.uvgrab.w);
#endif
"
I compiled and ran the code, but the entire game was double vision. So I un-commented the UNITY_APPLY_FOG line, recompiled and re-ran, but the game stays in double vision still. Only way I can get it to render normal now is to switch back to multi-pass rendering. So, two things…

  1. Is there any way to get halo’s to render behind a distortion material such as FX/Glass/Stained BumpDistort?
  2. Anyone else run into this sort of double vision causing issue?? And know how to fix it?

Thanks!

1 Like

Yep, running into it myself.