My game uses Unity’s post-processing package for visual effects. I also draw various overlays for each object (velocity, color, etc.) as a debugging aid. However, these debugging aids are affected by the post-processing effects. I don’t want that; I just want plain lines. How can I do that?
Hi
This is surprisingly tricky unfortunately.
The reason is that several post-processing effects change things around in a way that ALINE can’t get access to the correct buffers to draw to (or they use a different coordinate space).
If you use the URP you can try to change the ALINEURPRenderPassFeature.cs script on line 31 to make it draw after post-processing effects. That might work for you depending on which post-processing effects you use.
Ah, I forgot to mention that I’m using the built-in pipeline, excuse me.
No solution to it, huh? Nothing I can do with a RenderTexture
or anything? These are debugging aids (as opposed to in-game rendering), so as long as performance isn’t comically terrible I’m fine with turning them on and off.
Hmm.
Hmm. With the built-in pipeline ALINE draws during Camera.onPostRender
, at which point I thought that all post-processing effects would be done, but maybe this post-processing package does something special?
I suppose you could render your scene to a render texture (ALINE will not render to this camera by default) and then render a separate camera on top which just blits the render texture onto the screen and allows ALINE to render on top of this. I haven’t tried this, but I think it should work in theory.