-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Use a skinned model that shows off skinning #25654
Conversation
b07f7e5
to
3e54e24
Compare
3e54e24
to
2236516
Compare
Shaved a bit off the file size, 3.1 MB → 1.3 MB: |
@donmccurdy, what did you do? what tools/options do you use? |
|
sadly it apparently uncovered a bug in the Three WebGPU support. With the compressed file I get
|
Ah, possibly we don't support interleaved vertex attributes in WebGPU yet? This version should work if that's the cause, I added If that's not fixing it no worries, feel free to keep the existing model! |
That one got a similar error.
I'll use the bigger file for now. I don't know if I have time to fix the WebGPU code. I'm sure it's more complicated but the error is straight forward so maybe there's a possibility that it's a simple fix. |
Seems like the issue is in this file. |
Related: #25249 |
AFAICT there's a normalized Int16x3 attribute in the file. WebGPU only supports 32bit formats x3. It doesn't support any 16 bit formats x3 nor x1, nor 8bit formats by x3 nor x1 Two workarounds would be to either, at load time, convert the data to something WebGPU supports, or stop using attributes and use storage buffers and pull the data out in the shaders. |
Ok, sorry for the trouble! Ignore the compressed model for now. I'll have to look into what we can do with WebGPU, maybe need the tool to have an option padding the buffer for the correct byte stride. |
I'd think you'd want GLTFLoader to load any GLTF and not just padded ones. I'm not sure where is best to fix it. In the GLTFLoader (in which case it would have to be aware that it's loading for WebGPU vs WebGL) or in the WebGPURender (trying to make it either support 8bit and 16bit x3 and x1) directly via shader contortions or trying to make it do the conversion. My guess would be it'd be best to make the loader do this. That would keep the renderer simpler |
Ah, no I wouldn't want to change the renderer here either. And ideally GLTFLoader can just upload buffers without repacking them vertex by vertex. I'm thinking perhaps glTF Transform needs to have an additional vertex layout option, when quantizing geometry for WebGPU. |
Fixed #24005.
Description
Update a few skinning examples with a model that shows off skinning more clearly