Closed xiaoiver closed 1 month ago
In WebXR there're multiple XRViews e.g. left and right eyes. So we need to support rendering to cameras instead of a single camera.
https://threejs.org/docs/#api/en/cameras/ArrayCamera
Since we use RenderGraph now, each camera should have its own render pass.
this.cameras.forEach(({ viewport }) => { // main render pass this.builder.pushPass((pass) => {}); });
目前确实能根据左右眼相机渲染两次:
但右眼相机渲染完才设置 viewport,导致重合在一起:
第二个问题是 z-fighting 导致的闪烁:
https://threejs.org/examples/webgl_camera_logarithmicdepthbuffer.html
🤔 This is a ...
🔗 Related issue link
In WebXR there're multiple XRViews e.g. left and right eyes. So we need to support rendering to cameras instead of a single camera.
https://threejs.org/docs/#api/en/cameras/ArrayCamera
💡 Background and solution
Since we use RenderGraph now, each camera should have its own render pass.
📝 Changelog
☑️ Self Check before Merge