secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
211 stars 53 forks source link

[PBR] Incoherent and too dark lighting seen when RenderReflectionEnabled is FALSE (which is always the case with OpenGL 3.x too) #897

Closed vldevel closed 8 months ago

vldevel commented 8 months ago

Environment

Second Life Release 7.1.3.7821226606 (64bit) Release Notes

CPU: AMD Ryzen 9 7900X 12-Core Processor (4699.96 MHz) Memory: 64009 MB OS Version: Microsoft Windows 10 64-bit (Build 7601) Graphics Card Vendor: NVIDIA Corporation Graphics Card: NVIDIA GeForce RTX 3070/PCIe/SSE2

Windows Graphics Driver Version: 31.0.14051.5006 OpenGL Version: 4.6.0 NVIDIA 550.40.07

Window size: 1909x1172 Font Size Adjustment: 96pt UI Scaling: 1 Draw distance: 256m Bandwidth: 10000kbit/s LOD factor: 4 Render quality: 5 Texture memory: 7591MB Disk cache: Max size 1638.4 MB (71.0% used)

J2C Decoder Version: KDU v7.10.4 Audio Driver Version: FMOD Studio 2.02.13 Dullahan: 1.14.0.202310131404 CEF: 118.4.1+g3dd6078+chromium-118.0.5993.54 Chromium: 118.0.5993.54 LibVLC Version: 3.0.16 Voice Server Version: Not Connected February 27 2024 05:01:48

Description

When switching RenderReflectionEnabled to FALSE, we observe a dramatic change in the scenes lighting, which becomes way too dark, while only reflections should be affected by this setting... Please note that being able to switch RenderReflectionEnabled to FALSE while using a reflections-capable OpenGL version is desirable, be it to improve performances (especially on low end hardware) or, and especially, in my case, to allow rendering non-PBR scenes without the ugly blue hue otherwise seen on shiny objects.

Reproduction steps

Using a system with at least OpenGL v4.00 available, launch the viewer and go to some outdoors scene. Open the Debug settings floater so to be able to access to RenderReflectionEnabled. Detach the World -> Environment menu to be able to quickly switch between EE settings. Now, for each entry in the latter menu, try with RenderReflectionEnabled set to TRUE and FALSE, and observe the dramatic changes in scene lighting.

cosmic-linden commented 8 months ago

RenderReflectionEnabled=false is an advanced graphics setting which disables image-based lighting, which is meant for machines that can't support the SL viewer's implementation. As you have likely discovered, this is the case for lower OpenGL versions. There is limited development resources for those older OpenGL versions.

If you know of a specific scenario where image-based lighting is causing performance issues, feel free to open another ticket. We would ideally want image-based lighting to work well on as many machines as reasonably possible, as it is necessary for GLTF compliance.

For the undesired blue hue, it's really hard to know what's up without knowing the environment setting and/or object responsible.

Closing this because I personally doubt the semantics of RenderReflectionEnabled will change. But feedback is still welcome.