- Home /
weird shading/lighting issue with QualitySettings.SetQualityLevel in WebGL
I implemented a way to change quality of the game using the V key to cycle through the 6 default quality levels. When I tried playing the game in editor, everything works as expected. When I played the built game in WebGL, toggling quality also makes the scene look darker, and somewhat tanner or something. Continuing to press V until you toggle back to "Fantastic" doesn't fix it either, you have to refresh the game. Any fixes?
Here's an itch.io link if you want to see the issue in action. link
Well I've found that it probably has something to do with the 'Reflection Intensity" variable under Lighting > Scene, because setting that to 0 makes the game in editor look identical to the problem WebGL version. I added a line to my quality change code to set that to 1 every time the quality is changed. Since the problem doesn't occur in the editor, I tested by having the Lighting > Scene panel open and manually setting reflection intensity to 0, which seemed to work, as pressing V to change quality also set reflection intensity back to 1 and made the scene look correct. However, when I built and ran the game, the problem was still there. This is definitely gonna be a pain to troubleshoot cause rebuilding the game takes about 5 $$anonymous$$utes each time.
Checking under the Quality panel, I found that for qualities 0 -> 2, "Real Time Reflection Probes" is turned off. I'm gonna try rebuilding the code with V only set to toggle between qualities 3 through 5, to see if that's the issue.
Ok that worked, now I'm gonna try enabling "Real Time Reflection Probes" on all quality levels and letting v toggle all qualities again.
Your answer
Follow this Question
Related Questions
blend4web is better than unity WebGl ? 1 Answer
Raymarching - bad shadows/light quality on fractals 0 Answers
On Android. How many lights can you have in a Scene or the total game? 1 Answer
Make game start looking nice 1 Answer
Light quality 0 Answers