Hello,
We want to cull shadows which are very far away from our camera.
We found Light.layerShadowCullDistances which going by the docs sounds perfect, however when we use it it behaves strange.
I’ve set up a basic script so that two layers have different shadow culling distances
Light light = GetComponent<Light>();
if(light)
{
float[] layers = new float[32];
layers[0] = 5;
layers[5] = 50;
light.layerShadowCullDistances = layers;
}
When using this script it would seem to work for close objects however if an object is far away from the camera it would still be rendered to the shadow map. Why is this? Is there not just a way to discard renderers from the shadow map which are too far away from the camera?
Kind regards,
Tom