[BUG?] Culling called even if disabled everywhere

Hello everyone,
As the title suggests, I disabled Occlusion Culling in every camera, but inside the profiler I still see the culling being called, do you guys have any ideas?

That is probably frustum culling

1 Like

Oh, yeah, that can be it… do you know any way to disable/inhibit it?

You should not. Then unity would try to render meshes behind camera also

The problem is that it’s a 2D game so I don’t need it at all

Frustum culling still works in 2D. It will cull anything that is not on the screen. Why do want to disable it? Generally speaking, rendering absolutely everything in the scene will take a lot longer than culling it.

There’s no way to disable frustum culling apart from manually rendering everything using command buffers and not using any built in rendering components.

If you have a lot of time spent in culling, you may want to look into manually disabling objects outside of the screen view. That’ll reduce the culling time as it has fewer objects it needs to cull, but may increase your overall frame time since enabling and disabling objects can be expensive. So you don’t want to do this often, and you don’t necessarily want to disable a lot of objects at once (it’ll create a spike in the CPU time).

I see, would it be a good idea to subdivide the scene in quads and put all the objects as children of that quads, so I’ll just disable enable quads when the player is inside the bb of a quad?

Yep, that’s a valid way to handle it. Though you need to take into account what the screen can see vs just being the player position. You can either have really big bounds for each quad that’s roughly the size of the screen, or compare the screen bounds with the quad bounds directly. The later option is nice because it means zooming in and out, as well as ultra wide screen monitors are better supported without needing to change scene data, and what is or isn’t in view can be more tightly culled.

Yeah sure, I was thinking to take the camera FOV into consideration, thanks for the advice!