- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 4.2k
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