Textures on meshes aren't animated
PepperCode1 opened this issue ยท 6 comments
If a mesh is consumed by the mesh consumer inside emitBlockQuads, any textures that are normally animated will be locked on their first frame. Toggling Sodium's "Animate Only Visible Textures" option doesn't do anything either. This behavior can be observed through mods like ConnectedTexturesMod For Fabric (CTMF) and JSON Model Extensions (JMX).
Aha, SpriteFinder
already has what I'm looking for. Might impact chunk building performance a bit, and I think I'll have to cache the Sprite reference in the vertex format for meshes.
This is the same issue as #64, but I'll leave both open as this issue explains the problem better. It might be quite tricky to fix, since I don't think the FRAPI pipeline preserves Sprite metadata (might need to do some kind of reverse lookup?).
Also see CaffeineMC/sodium-fabric#839 for why this still doesn't work (on 1.17) when Animate Only Visible Textures is disabled.
Note that the aforementioned PR has now been merged - so you can work around this issue in Sodium 0.3.2 by disabling Animate Only Visible Textures. Since Sodium 0.4 is investigating direct FRAPI support, I'm probably not going to implement this in Indium.
A few months later and this is still an issue with no sodium with FRAPI support. 0.4 did not come with it.
Unfortunately I have very little time to work on this project, and fixing this issue properly would likely be a significant undertaking, and would be obsoleted when Sodium implements FRAPI/FREX. I'll happily accept a PR fixing the issue, but I don't consider it worth my time to work on myself.