Godot Version
4.8.dev7
Question
I’m creating a 3D game which also features a FPV flashlight (no mesh, just the light), and it has been working well for a month. Today it started throwing weird light artifacts around when I turn the light on and aim the camera slightly up and down. The light starts wrong (weird blurry light on the floor below), and the artifacts move and twist around in a weird way, as if reflecting off of something, or going through a prism. None of that exists in my game.
And when I aim very high or low, then it suddenly restores it back to the correct projector shape and then stays good as long as the light is turned on. When I turn the light off and back on, then it starts all over again. But not always. It does it in certain areas in my test level. The artifacts seem to contain pieces of textures of my 2 other lights that have projector textures. Those lights are simple stationary lamps. Player’s flashlight does not share any projector texture with anything else, it’s exclusive.
When I turn the flashlight spotlight’s shadow off, then I can only see the artifacts. When I enable the shadow and disable the projector texture, then I get a normal consistent circular light that doesn’t cause any artifacts. However, I also noticed that the flashlight’s shadow is missing in the same areas and at the same angles where the projector artifacts happen. And when I aim it around, the shadows suddenly appear, just like the projector corrected itself when the texture was still enabled.
This is a mystery case, I have spent the entire day f***ing with this without success. Leaving the flashlight a plain circular light is a poor solution, it looks bland.
I also have a projector texture on a rotating beacon, and I haven’t seen any weird stuff with that one. Only player’s spotlight-flashlight is acting up all of a sudden.