Hi All,
I have encountered a slightly odd problem with the built in renderer (not universal or HDRP) on 2018.4 LTS.
Essentially, I have a large gameobject which brings in the environment, and in particular alpha rendered water. If the object is enabled when I start the game, then a lot more grab passes are shown in the frame debugger, which is probably bad for performance but means my explosions which use distortion from grab pass look correct.
If I disable the object, then enable later only one grab pass is performed, but this is before the water rendering, so the distortion in the explosions “sees through” the water Here is a side-by-side from the frame debugger:
It looks like if the object is disabled on startup then unity is deciding that only a single shared grab pass is needed but if enabled then it enables grab “per mesh”. Does anyone have any details on how unity decides this?
I can fix this using a zero-sized water object with the same shader etc placed in front of the camera but I was wondering if anyone knew how to debug when and why unity calls a grab pass, or if there was a better way to artificially “force” a grab pass? Ideally it would probably just be two grab passes, one for the water, then afterwards a single shared carried out after the water is drawn I think…
Thanks in advance for your help!