-
-
Notifications
You must be signed in to change notification settings - Fork 36k
Closed
Closed
Copy link
Milestone
Description
Description
I am using a DirectionalLight and update its position when the camera has moved. This works fine with the WebGlRenderer, but I try the same thing with the WebGPURenderer (in Firefox), every time the light is moved, the shadows glitch. I would expect the same behavior in the WebGL2 fallback as when directly using the WebGlRenderer.
Reproduction steps
scene.add(dirLight.target);
const cameraLightOffset = new THREE.Vector3().copy(camera.position).sub(dirLight.position);
controls.addEventListener('change', () => {
dirLight.position.copy(camera.position).sub(cameraLightOffset);
dirLight.target.position.copy(controls.target);
});or any other code that updates the dirLight position when the camera position changes.
- Notice that the shadows look fine in the webGL version, but in the WebGPU->WebGL2 fallback version, they glitch
Code
// see live exampleLive example
Screenshots
No response
Version
r171
Device
Desktop
Browser
Firefox
OS
Windows