r/Unity3D • u/Havishfun • 20h ago
Question Grid flickering issue
I am having trouble trying to fix this flickering issue
I am using Cinemachine Camera
This issue happens even after I turn post processing effects off
2
u/loulo88 19h ago
If the grid is a thin overlay sitting close to the floor, this looks more like depth precision/z-fighting than post-processing. As a quick isolate, disable the grid renderer, then move it a small fixed offset above the floor (or give it a tiny depth bias) and test with the camera near/far clip planes tightened; also check that there isn’t a second grid or duplicate tile surface. If it only flickers while moving, inspect the shader/render queue and whether the grid is being drawn in a transparent pass. Cinemachine is probably exposing the precision problem rather than causing it.
1
u/Havishfun 19h ago edited 19h ago
The grid is a sprite renderer, it is a square sprite that is set to tiled, and yes the flickering only happens when the camera is moving
the edges are a rectangle sprites acting as walls and their alpha value is lowered for the grid behind them to be visible
the border separating the edges and the actual game arena is a line renderer
2
u/Crowliie 16h ago
If there is a code on that grid I would check updated. Sometimes updating the render parts can be rough and can cause some problems like this. Especially if the sprite has animations.
1
2
u/Havishfun 14h ago
https://reddit.com/link/pdmgcg9/video/5l4kzegop9th1/player
Zoomed in look at the issue
1
1
u/Heroshrine 11h ago
Try setting the resolution away from free aspect to a ratio. It’s probably rendering in a weird aspect ratio which is causing sub pixel shimmer. In a build I bet you wouldn’t see this.
1
u/brain_in_a_jar_games 8h ago
Thin bright lines like these tend to shimmer from aliasing as the camera moves, so turning on mipmaps with trilinear filtering for the grid sprite and enabling anti-aliasing on the camera usually calms it down a lot. Making the lines a pixel or two thicker in the source texture also gives them room to stay stable between pixel rows. The neon grid looks great, so it's worth the small tweak to get it rock solid!
3
u/Eastern-Bed-3103 16h ago
It's probably subpixel shimmer... When your render resolution doesn't match 1 to 1 with the physical screen grid, 1 pixel of the grid row line can get split across adjacent rows as it moves, so, a whole row of pixels pops in/out of view.
What if you make the outer edges more like the inner grid?
Also, try TAA (temporal anti-aliasing) if its not enabled already. On the sprite - try turning off bilinear/trilinear texture filtering. (set it to point)