Repository navigation
Open
Description
You can use the new WebGPURenderer with aframe 1.7.1 with importmap, if you alias three to three.webgpu.js, aframe will use WebGPURenderer instead of WebGLRenderer, see source of the example https://aframe.io/aframe/examples/showcase/webgpu/ and using the latest super-three 0.177.0. But to use multiview with WebGPURenderer you will need a change here
aframe/src/core/scene/a-scene.js
Lines 529 to 547 in 9ff61ff
| if (rendererAttr.multiviewStereo) { | |
| rendererConfig.multiviewStereo = rendererAttr.multiviewStereo === 'true'; | |
| } | |
| this.maxCanvasSize = { | |
| width: rendererAttr.maxCanvasWidth | |
| ? parseInt(rendererAttr.maxCanvasWidth) | |
| : this.maxCanvasSize.width, | |
| height: rendererAttr.maxCanvasHeight | |
| ? parseInt(rendererAttr.maxCanvasHeight) | |
| : this.maxCanvasSize.height | |
| }; | |
| } | |
| // Trick Webpack so that it can't statically determine the exact export used. | |
| // Otherwise it will conclude that one of the two exports can't be found in THREE. | |
| // Only one needs to exist, and this should be determined at runtime. | |
| var rendererImpl = ['WebGLRenderer', 'WebGPURenderer'].find(function (x) { return THREE[x]; }); | |
| renderer = this.renderer = new THREE[rendererImpl](rendererConfig); |
Update the example https://aframe.io/aframe/examples/performance/multiview-extension/?multiview=on or duplicate it to test it with the new WebGPURenderer.
I was answering this on discord, so I'm creating the issue if anyone want to test it and do the PR.
Metadata
Metadata
Assignees
Labels
No labels
Activity
mrxz commentedon Jul 29, 2025
We could rename it to
multiviewin super-three, while keeping the property namemultiviewStereo.dmarcos commentedon Jul 31, 2025
Yeah. What are the implications of using WebGPURenderer? Is it feature complete? Many components expected to break?
vincentfretin commentedon Aug 1, 2025
I'm not following the development of WebGPURenderer that closely and I'm not currently using it.
I just know that the aframe text component is not working because of the shaders from last time I checked all the aframe examples with WebGPURenderer using
npm run start:webgpuin this repo.vincentfretin commentedon Aug 14, 2025
A quick test with
https://192.168.1.15:8080/performance/multiview-extension/?multiview=on (replace by your ip)
I got a warning
because of the fps counter.
In VR it renders, but I have no idea if the multiview is working or not, I don't see the fps :D
Separate note, multiview with the old WebGLRenderer does't work anymore, even with the fix in
supermedium/three.js#24
vincentfretin commentedon Aug 14, 2025
With OVR Metrics tool, I get 15fps in VR and issue with black background instead of white so really bad. With the old renderer with multiview we got 60fps.
With multiview: false, I have a gl.getContextAttributes is not a function error in XRManager.setSession.
vincentfretin commentedon Aug 14, 2025
There is another multiview variable that creates a WebGLMultiview instance so we would need to rename that variable to something else glMultiview for example.
vincentfretin commentedon Aug 14, 2025
supermedium/three.js#25 fixes the multiview for WebGLRenderer on three 177, I got 45fps with multiview on compared to 30fps with multiview off. I also have a black background in VR. I'm not sure what fps we really had in previous aframe master version (I don't know which one worked) and if the background was black or not.
mrxz commentedon Aug 18, 2025
I think the black background is "correct", as there's no
a-skyorbackground=defined for that scene. I also see 45fps with it enabled compared to 30fps with it off on a Quest 3. One thing to note is that the example places cubes randomly in a cube around the origin, so there can be variances from run to run. Though, the handful of times I did run it seemed mostly consistent with the above observation.