- Home /
Light glitch when not in camera's view
Hello!
I'm having some difficulties with Unity's Point Lights rendering weirdly when the base object is not seen by the camera. This gif might help you understand.
I'm pretty sure this has to do with the Light's render mode as it doesn't happen when I am using Not Important / ForceVertex. But the problem with using this mode is that it doesn't light the background as you can see right here.
Anyways, this is what it should look like.
I thought of making 1 light with LightRenderMode.ForceVertex (Not Important) and another one with ForcePixel so the better of both worlds, but I was worried about performances and, also if there's a better/cleaner way to do it...
Thanks!
I don't know the answer to this however if I were you I'd use sprites for lights in 2D, additive/transparent light sprites would be a lot faster than point lights.
So making a sprite that looks like a point light and has the additive transparent shader would somewhat work like a light? Interesting, I might try it out!
@Whiteleaf Ok, so I did what you suggested, and used the ForceVertex so that I keep the lighting for the tiles (background is using a separate additive texture like you told me). The problem is that whenever no light is rendered, something weird happens...
I have no idea why this is happening. BTW, I decided to keep using the Unity Lights because it looked better than using a texture...
Your answer
Follow this Question
Related Questions
Special lighting for close-up camera 1 Answer
Lights only sometimes working 1 Answer
Render Lighting-only textureless? 0 Answers
Using HDRP, why does my UI block light making everything around it dark? 2 Answers
HDRP spotlight fading out with camera distance.,HDRP spot light fading out due to camera distance 0 Answers