Edit: Sorry, I’m talking about point lights, not spot lights.
My Unity 2021.1.24f1 app is exported for WebGL and “PC, Mac & Linux Standalone”, so it has to work for both but I’m having problems with my point lights when the project’s set to/exported as “WebGL”:
The room I’m currently working on is pretty long and uses 3 point lights for lighting. On one end there’s a portal (used to enter/leave the room) that’s a simple plane with a “flowing lava”-type shader.
In the editor the point lights look fine but in the exported WebGL version (tested with the latest Firefox) the lights keep flickering and sometimes go out completely, depending on the player position and the direction it (=the camera) is facing.
The point lights were all set to “realtime” but I noticed that “realtime indirect bounce shadowing is not supported for Spot and Point lights”, so I set the “indirect Multiplier” to 0, generated new baked lightmaps, then tested it again:
It’s still the same: The first (-20,9,0 - as a non-static child of the static room object) and third light (20,9,0) are only visible if the player is pretty close to it and only if the camera is looking specific directions. The light in the middle (0,9,0 but also x,9,0 in world coordinates) is always there and never flickers (as far as I’ve seen).
Is this a bug or a setting based problem?
I can’t set the lights to “baked” because the portal and the player would then be dark. I haven’t exported the app with “mixed” yet because the baked light textures on the walls have square artifacts and there’s a weird shadow line in the edge where the wall meets the floor that makes it almost look cel-shaded - so not sure if that setting would fix the flickering problem.
What settings do I have to change to fix the bad baked lightmaps, without turning the images into 100+mb files (3files, currently 20mb in total)?
Point light and lightmap settings: