Conversation
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
| export const _SRGBAFormat = 1035; // fallback for WebGL 1 | ||
|
|
||
| export const WebGLCoordinateSystem = 2000; | ||
| export const WebGPUCoordinateSystem = 2001; |
There was a problem hiding this comment.
I think these should be called GLCoordinateSystem and NDCCoordinateSystem?
There was a problem hiding this comment.
If we assume this, I think we would imply that WebGL does not have an NDC when it's just different. I was inclined to use the term NDC but after implementing CubeCamera I had other issues with the coordinate system. For these reasons I believe that using the name WebGPUCoordinateSystem for example would be easier to create any future path.
|
I think this is the most cleanest solution to this problem indeed! |
|
|
||
| camera.coordinateSystem = coordinateSystem; | ||
|
|
||
| camera.updateProjectionMatrix(); |
There was a problem hiding this comment.
@mrdoob I fixed ( #23372 (comment) ) issue here. If the camera has updated the projectionMatrix using the WebGL coordinate system, it will now update again with the WebGPU coordinate system.
|
Looks good to me! 👍👍 |
Fixed #23372
Description
I mixed @Mugen87 and @CodyJasonBennett work into this PR, and I prepared it for
WebGPURendererby removing the hack. I think the idea that @Mugen87 is the best one about Coordinate System, because modifying a little we have access to theRenderer.coordinateSystemandCamera.coordinateSystemcan facilitate some necessary paths, like in my recent case I had to change theCubeCamerato theWebGPUCoordinateSystem.