filament
filament copied to clipboard
Lighting singularity in web viewer
Describe the bug Web viewer shows a strange lighting singularity.
To Reproduce Steps to reproduce the behavior:
- https://google.github.io/filament/viewer/
- Drag-and-drop the Duck sample model (https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/1.0/Duck)
Expected behavior The lighting should be smooth and continuous across the surface. However it is showing a singularity.
Screenshots
Desktop (please complete the following information):
- OS: Windows 10
- GPU: NVIDIA RTX 2070 laptop
- Browser: Chrome Version 103.0.5060.134 (Official Build) (64-bit)
See https://github.com/google/filament/discussions/5824
It looks like a Chrome bug with DirectX on Windows :(
See https://bugs.chromium.org/p/chromium/issues/detail?id=1348363
@romainguy I'm looking for a possible workaround for this problem until it gets fixed. Is it possible, from within our program, to switch the Chrome backend from DirectX to OpenGL? Or, does that require the user to manually set it? It is probably untenable to ask our users to do the manual switch.
I don't think it's possible to programmatically switch Chrome's backend, especially since the GPU process is shared by all tabs. There might some other workaround you could try though, e.g. with view settings or matc optimization flags.
I can reproduce this even without using our glTF ubershaders, e.g. the parquet shader ball looks like this.
Next I'll try playing with the opt flags.

Anisotropy for free? ;)