Horse markings render over horse armour
Traben-0 opened this issue ยท 11 comments
What happened?
with iris-mc1.18.2-1.2.2-build.32 all horses render their markings over the top of their armour
I have reproduced this consistently with only iris and sodium installed and no resourcepacks used.
simply load a world, tame a horse and place diamond horse armour on it
I don't know if this is relevant but horse armour uses the getEntityCutoutNoCull renderLayer and the markings use getEntityTranslucent, in vanilla atleast.
Screenshots
Relevant log output
No response
Minecraft Version
Minecraft 1.18.2
Iris Version
iris-mc1.18.2-1.2.2-build.32.jar
Sodium Version
sodium-fabric-mc1.18.2-0.4.1+build.15.jar
Operating System
Windows 11
What is your GPU?
Nvidia Geforce RTX 3080
Java Version
Java 17
Additional context
No response
I still plan on finding a better way to fix this, but for now I've made this mod that fixes this issue.
I don't know if this is relevant but horse armour uses the getEntityCutoutNoCull renderLayer and the markings use getEntityTranslucent, in vanilla atleast.
This is indeed relevant and the underlying issue is that Iris Batched Entity Rendering is trying to ensure that translucent things render after other things, in the hopes that it solves issues like translucent slime parts not blending correctly with other entities.
However, in this case, it breaks since the translucent horse markings are being rendered after the non-translucent horse armor rather than the other way around.
Here's the part of the code that does the sorting based on the "transparency type":
Confirmed for version 1.6.1.
I'm not a huge modder, but based on how things appear, it seems like the markings and armor textures on the horse are like layers. In this case, the markings are being applied or rendered after the horse armor, when it should be the other way around. The markings should be rendered before the armor, so that the armor overrides and covers those markings. I feel like changing the layer ordering should be relatively easy, please let me know if this isn't the case.
Confirmed for version 1.5.2 for 1.19.4.
So, how does this get fixed? Is there some sort of patch, or do we need to wait for an update?