Repository navigation
WebGLRenderer: Support FrustumArray. - #34275
Conversation
π¦ Bundle sizeFull ESM build, minified and gzipped.
π³ Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
|
This is a great cleanup! Do you want me to test it? |
|
Yes, that would be good! Thank you! My main concern is that the XR camera now carries different transformation and projection matrices (the one from the first sub camera) since these matrices are not derived from The thing is: If somebody used the XR camera to setup an instance of |
I tried the examples of WebGL and WebGPU WebXR on my Quest 3 and they rendered correctly. |
|
Quickly noting that #21002 shows some potential usage of the combined frustum (as noted in #31672). My opinion is that literally raycasting from the combined frustum is probably just as unsatisfying as raycasting from the left camera would be. We could document a better solution in the migration guide if we could come up with one; a (totally untested) suggestion would be that exposing more of the |
Fixed #31672.
Fixed #16766.
Closes #31677
Description
The PR ensures
WebGLRenderersupportsFrustumArray. In this way, view frustum culling in XR happens like inWebGPURendererper sub camera.Now that we cull per camera, we can remove
setProjectionFromUnion(). To keep ray casting in context of phone AR intact, the XR camera copies the projection matrix from the first sub camera by default.Raycasting often uses
setFromCamera()and that requires a correct projection matrix in the user camera. In VR, raycasting is normally done with the controllers and that involves no projection matrix. ARaycasterthat should detect intersections along the look direction of the XR camera (gaze-style interaction) will now use the transformation and projection of the left eye only.This must be noted in the migration guide.
/ping @cabanier