filament icon indicating copy to clipboard operation
filament copied to clipboard

Lighting singularity in web viewer

Open echadwick-artist opened this issue 2 years ago • 2 comments

Describe the bug Web viewer shows a strange lighting singularity.

To Reproduce Steps to reproduce the behavior:

  1. https://google.github.io/filament/viewer/
  2. 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 image

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)

echadwick-artist avatar Aug 01 '22 17:08 echadwick-artist

See https://github.com/google/filament/discussions/5824

It looks like a Chrome bug with DirectX on Windows :(

romainguy avatar Aug 01 '22 18:08 romainguy

See https://bugs.chromium.org/p/chromium/issues/detail?id=1348363

romainguy avatar Aug 01 '22 18:08 romainguy

@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.

BStringhamVRSK avatar Aug 19 '22 18:08 BStringhamVRSK

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.

prideout avatar Aug 22 '22 18:08 prideout

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.

windows

prideout avatar Aug 22 '22 18:08 prideout

Anisotropy for free? ;)

echadwick-artist avatar Aug 22 '22 18:08 echadwick-artist