xml3d / xml3d.js

The WebGL/JS implementation of XML3D
Other
75 stars 25 forks source link

Shadow casting lights sometimes fail when other lights are present in the scene #193

Closed csvurt closed 8 years ago

csvurt commented 8 years ago

To reproduce, add a directional light to the MeshLab example:

<light model="urn:xml3d:light:directional" style="transform: rotate3d(0, 1, 0, -45deg)">
       <float3 name="intensity">0.7 0.7 0.7</float3>
</light>

The spot light contribution to the Meshlab object will disappear entirely, so do the shadows. Only the ground plane still receives a contribution from the spot light. Adding display: none to the directional light will restore the correct lighting from the spot light.