Immediate Mode Doesn't Work with Pixel Perfect Camera
If I disable my 2D Pixel Perfect Camera component, then I see my immediate mode shapes appear correctly. When I enable Pixel Perfect Camera, the immediate mode shapes disappear.
Non-immediate mode shapes render correctly in all scenarios - this issue is only with immediate mode shapes.
I originally tried using Unity's GL.Lines method and experienced the same problem (I raised a bug with them). I was hoping Shapes would solve my problem. Is the issue with Unity itself?
this is likely an issue with the way the pixel perfect camera works - so it seems to be a Unity bug yeah :c
it seems to:
• cache the buffer at ResolveColor
• then Shapes draws (Shapes Draw Command)
• then it reapplies the old ResolveColor state in Camera.ImageEffects.DrawDynamic, so anything that was drawn in between gets discarded.
I imagine GL.Lines has the same issue because it happens between these steps too :(
Edit: Actually, this is a specific issue when called at the camera event BeforeImageEffects, if you instead use AfterForwardAlpha it seems to work :)
(this is still a Unity bug though, before image effects should absolutely work, but it doesn't)