Camera.layerCullDistances Help!

Hi guys,

how does the array Camera.layerCullDistances works? I read the documentation (this one) but I’m confused. It seems like it lets you override the behavior of the camera’s farClipPlane for each layer but I can’t make it work. I set all the values to 1 but everything renders. Does it work in Unity Free? Where could be the problem?

Thanks!

ok I found the answer by myself, write it here for if someone looks for the same topic.

The array Camera.layerCullDistances don’t works the same way that Camera.farClipPlane. The variable farClipPlane makes that everything further than this is not rendered. No matter if it’s an entire mesh or not, Unity “cuts” rendering.
In the other hand, the values of layerCullDistances (1 per layer) just cull the objects of each layer if they are beyond the corresponding value. The difference is that this one don’t “cut” meshes, an object needs to be entirely out of the range in order to be culled (the same way as the frustum or occlusion culling). As the documentation says, it can be used to cull small objects.