CaffeineMC / sodium

A Minecraft mod designed to improve frame rates and reduce micro-stutter
Other
4.77k stars 810 forks source link

NeoForge QuadTransformers.transform does not rotate sodium quad data #2835

Open MehVahdJukaar opened 1 day ago

MehVahdJukaar commented 1 day ago

Bug Description

Neoforge QuadTransformers.transform does not seem to rotate sodium extra quad data such as ModelQuadFacing . This results in quads from custom models to being culled away by backface culling despite them baving both their Normal direction and Direction set correctly

Reproduction Steps

I could observe these effect in 1.21 which caused some of my models to get culled away when looked at from certain angles

Log File

not crashing

Crash Report

no crash

IMS212 commented 1 day ago

This may be partially fixed in this commit. A full fix is not particularly feasible, as NeoForge does not have a callback for when the data is modified.

MehVahdJukaar commented 1 day ago

Would you mind telling me what would I need to modify to allow a proper fix for this through compat code on my and at least? Ideally in a way that would not clash with this half fix. In other word some code I could run for my own stuff so that this won't happen for my own transforms

IMS212 commented 1 day ago

As long as the quad you’re transforming has not been used to render yet, it is fine.

MehVahdJukaar commented 1 day ago

Would it work if I copy it? I'm transforming quads from another block to use in my own model

IMS212 commented 1 day ago

Yes, that’d work.

MehVahdJukaar commented 22 hours ago

Just to be clear this will work on next update?