pissang / clay-viewer

3D model viewer with high quality rendering and glTF2.0/GLB export
https://pissang.github.io/clay-viewer/editor/
BSD 3-Clause "New" or "Revised" License
767 stars 97 forks source link

[Bug] Troubles with negative values of light sources intensity [Win][0.1.1] #72

Closed bspotf closed 6 years ago

bspotf commented 6 years ago

Environment: Notebook Dell Inspiron N5110 Intel Core i5-2430M CPU 2.4GHz 6Gb RAM Intel HD Graphics 3000 GPU OS: Windows 10 Home 64-bit

Program info: Version: 0.1.1 desktop (Win)

Problem: When you set the value of light intensity to negative, a strange glow appears, as in the picture. lightbug When a new light source is added and its intensity is set to a negative value while the main value is default, the same metamorphoses occur with the shadow, which becomes white when the positive and negative values of the two sources are equal. ezgif-3-f8bc7ca7f9 In the event that the post effect is disabled, this problem is not observed ezgif-5-7c1e0848b5

Steps:

  1. Open qtek-model-viewer.exe
  2. Import any 3D model
  3. Make sure that the checkmark Cast Shadow in Light->Main is ticked
  4. Set the value of light intensity to a negative
  5. Set the main value to default and change the secondary light to negative then to equal to main
  6. Disable Post effect and repeat from step 4.
pissang commented 6 years ago

Thanks for the report. Fixed in the latest code. The color will be black if light intensity is negative in the next version