- Home /
How to know if a real time light is being rendered or not in C#?
Hi, basically I have a script which controls light intensity to create flickers and other effects. But I only want the effect to be active if the light emitted by the Light is visible (or if the light itself is visible on camera). For 3D objects (and sprites) I know there's the Renderer component which can say if an object is visible or not inside the camera's frustum. But, what about real time lights? How'd I know if the light is in sight? or still affecting some part of the visible screen? Is there some way to know? Though, If possible I'd like to avoid having all the lights raycasting for the player...
Occlusion Culling works on renders , no idea what it will do to lights. technically speaking a light is a visible entity and thus technically be culled.