-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GLTFExporter: Add support for WebGPURenderer #29509
GLTFExporter: Add support for WebGPURenderer #29509
Conversation
When using (First of all it was necessary to remove the The real issue is that the coffeemat asset is not correctly imported in
|
@Mugen87 the issue is caused by these vertex attribute conversions: three.js/src/renderers/webgpu/utils/WebGPUAttributeUtils.js Lines 50 to 62 in 1360b24
glTF does not permit the use of uint32 or int32 for vertex positions, and WebGPU does not permit 8-bit and 16-bit integer formats AFAIK, so the conversion for WebGPU is not compatible with glTF. Related: I guess GLTFExporter could convert the attributes to float32, or we could change the WebGPU patch to use float32, or we could wait on gpuweb/gpuweb#4549. But I think that probably doesn't need to block the current changes. |
Aside - when running this demo with WebGPURenderer there is a rendering issue on my device (macOS, M1, Arc/Chromium), before starting the export. Looks possibly related to integer geometry, too, maybe normalized uint8 and uint16 are not handled? Sort of off topic but just noting in case I forget. :) |
Then I vote for an attribute conversion in the exporter. |
@Mugen87 I've pushed a fix for the int32/uint32 problem, the
The model includes |
With #29680, the The issue with This seems to be more an issue of a broken world matrix. But I don't know yet where the root cause is. It might make sense to file a separate issue for that. |
Related:
WebGLRenderer
andWebGPURenderer
. #29295WebGPURenderer
. #29507Remaining: