[5.1.2f1] Unnecessarily agressive culling - how to tweak it?

Hi there!

I’m experiencing some trouble with some effects and graphics in the game we are currently developing. Some objects (particles and 2D sprites) cease to be rendered when they reach the border of the screen, even if they should still be visible. Since the camera barely zooms, we do not have any kind of LOD or custom culling zones in the game (and those objects are non-static, which should avoid culling calculations for them). I’ll give you some visual examples:

Fog issue

Sprite issue

In the first screenshot, you can see how a fog particle effect is perfectly rendered but disappears when the camera is a few pixels ahead. In the second one, the medallion sprite is rendered but, as the camera moves a little bit, vanishes.

We have a Perspective camera because we do make use of the Z axis for a lot of things (and we have some Z movement in some specific areas of the game), maybe that’s part of the problem? I haven’t configured anything related to culling, so this is Unity working automatically. How can I deal with this issue? It gets very annoying when you are walking and see sprites and particles pop in suddenly. And we are working really hard on our game’s art, so we really want to solve any erratic behaviour concerning visuals.

I’ve double-checked the scene setup and every gameObject’s renderer has a unique sortingLayer value, so it’s not a rendering issue. I’ve also tried setting mainCamera.TransparencySortMode to Ortographic, unchecking the Occlusion Culling flag in my camera and narrowing the Near and Far clipping plane values, but none of that worked either.

Thanks for your time.

Okay, found it! Although I do not know exactly why this happens.

The issue vanished when I changed those object’s Zscale value. Some objects needed a smaller Z and others needed a bigger Z. I’m glad to see this solved, although I still don’t know why scale in Z affects 2D sprites’ rendering.