Closed decahedron1 closed 10 months ago
This broke MToon - replace_mtoon_materials
isn't finding any MtoonReplaceMat
s, not sure why (first time working with Bevy). Marking as draft for now.
Just published a new version of bevy_shader_mtoon
, gonna take a look at this now
Did some refactoring (https://github.com/unavi-xyz/bevy_vrm/tree/0.12) but still running into a similar issue with replace_mtoon_materials
not finding data. It will have access to, for example, the GltfMesh
assets for a frame or two, then a morph vertex error pops up in the console and the system stops receiving them.
Looks like it might be caused by either https://github.com/bevyengine/bevy/issues/10388, or a similar issue with morph targets.
I ran into that error too. I don't think it's related to https://github.com/bevyengine/bevy/issues/10388 as it appeared to work (or at least no longer threw an error) when I manually edited the prepass.wgsl
file (note that cargo clean -p bevy_pbr
is required to force a rebuild)
- var vertex = morph::morph_vertex(vertex_no_morph);
+ var vertex = morph_vertex(vertex_no_morph);
ah ok, yeah I can see in the bevy commits that seems to be an unrelated error where they messed up the function name when setting the new 0.12 paths.
will have to take a fresh look at this then and figure out why the assets are unloading (I think? I still don't have a great grasp of the asset system)
Awesome think I got it working in https://github.com/unavi-xyz/bevy_vrm/pull/12, so gonna close this pr. Ended up doing a lot of refactoring. It still seems a bit convoluted but idk how else to do it, so I'm just happy its working lol.
Updates to Bevy 0.12. This requires a new version of
bevy_shader_mtoon
with https://github.com/unavi-xyz/bevy_shader_mtoon/pull/7.