I am trying to figure out a good way of determining
1) if a cone light with a certain position, direction, field of view and range is visible on the screen (frustum culling) and
2) how far away the camera is from the light so I can pick a fitting shadow map resolution.
I am currently treating the cone light like a point light with the center of the sphere being the origin of the cone light and the radius of the sphere being the range of the light, but this creates a lot of false positives and overestimates the shadow map resolution. I want to do more precise frustum culling, and I also want to calculate a more accurate distance from the camera to the closest point that lies inside the cone light's volume to better estimate the shadow map resolution.
For point lights I simply use the highest shadow map resolution available when the camera is inside the point light's volume, and then gradually reduce the resolution proportionally to
1 / (distance from center of point light - radius of point light)
if the camera is outside the point light's volume.
For cone lights I wish to do something similar. I want to determine if the camera is inside the cone light. If it's not, then I want to calculate exactly how far away it is from the cone light's volume, and pick a shadow map resolution based on that.
Thanks for reading!