Iris Shaders

Iris Shaders

36M Downloads

Rendering issues with "Show Me Your Skin!" mod

SplendidAlakey opened this issue ยท 8 comments

commented

What happened?

Using Iris with ShowMeYourSkin causes slight rendering issues in game (you can see a shiny outline where the invisible/transparent armor is supposed to be) and major rendering issues in it's GUI screen (body parts are fully culled unless the armor visibility is set to 0%).

Initially reported to the developer of SMYS, however, they replied that they would likely not be able to fix it on their own: enjarai/show-me-your-skin#19

Screenshots

2022-07-28_14 02 32

2022-07-28_14 02 36

Log output

https://gist.github.com/SplendidAlakey/0f539d5c287fd33cd351f039493426b0

Minecraft Version

1.19.1

Iris Version

1.2.6

Operating System

Windows 10

What is your GPU?

GTX 980

Additional context

Initial report was made using version 1.2.1 of SMYS, but it's reproducible in 1.3.1 as well.

commented

It looks like the outline is in reality the 1% transparent legs layer being drawn to the screen before the player shadow, which causes those pixels of the player shadow that are behind the legs layer to not be drawn because the depth buffer reports that there is something that is already closer on the screen. In other words, it's a classic translucency sorting problem. It's likely Iris Batched Entity Rendering that is causing the issue, since that relies on reordering and then batching together rendering calls to improve rendering performance, which can lead to transparency ordering issues.

That does explain why its an issue even when no shaders are enabled. Is there any way I can work around this on my side, aside from disabling entity batching entirely?

commented

Entity batching tries to observe the order of draw calls to figure out how to order translucency rendering. Reordering your render calls may or may not change things.

commented

I'm using the exact same ordering and pipeline as vanilla, just with some mixins to change the renderlayer and transparency somewhere along the way. I'll have to add that I'm not particularly well-versed in rendering or how Minecraft handles it. Though it seems like it'd be quite difficult to change the order in which the armor and playermodels render in relation to eachother.

commented

Setting the sliders to 0 will achieve that exact result, as it explicitely cancels the armor rendering instead of trying to render it with 0 opacity. Which I guess could be considered a workaround for this issue.

It doesn't take away from the fact hat the fully customizable opacity is one of the main features of my mod though, and having it be incompatible with one of the biggest mods out there is definitely not ideal.

Apologies, I'm not sure how your mod, and the Shine mod work in-depth. All I know is that somehow, Shine doesn't have issues with Iris. I don't mean to just drop the opacities, because that's an extremely awesome feature. I simply mean to say that perhaps fixing it is possible, due to the fact that a similar mod exists with little issue.

commented

Author of Show Me Your Skin here. This is still an issue, and while I've been looking into a fix for this on my side, I haven't made progress as of yet. I'd definitely like to get this fixed though, any ideas?

Instead of having a slider for opacity, could you instead make a toggle that instead of using opacities, altogether makes the piece invisible? Another mod called Skin Shine has a similar function to the mod, but I have no issues using it with Iris. I'd love to use your mod instead, because of the in-game GUI and customization per player.

commented

Author of Show Me Your Skin here. This is still an issue, and while I've been looking into a fix for this on my side, I haven't made progress as of yet. I'd definitely like to get this fixed though, any ideas?

Instead of having a slider for opacity, could you instead make a toggle that instead of using opacities, altogether makes the piece invisible? Another mod called Skin Shine has a similar function to the mod, but I have no issues using it with Iris. I'd love to use your mod instead, because of the in-game GUI and customization per player.

Setting the sliders to 0 will achieve that exact result, as it explicitely cancels the armor rendering instead of trying to render it with 0 opacity. Which I guess could be considered a workaround for this issue.

It doesn't take away from the fact hat the fully customizable opacity is one of the main features of my mod though, and having it be incompatible with one of the biggest mods out there is definitely not ideal.

commented

It looks like the outline is in reality the 1% transparent legs layer being drawn to the screen before the player shadow, which causes those pixels of the player shadow that are behind the legs layer to not be drawn because the depth buffer reports that there is something that is already closer on the screen. In other words, it's a classic translucency sorting problem. It's likely Iris Batched Entity Rendering that is causing the issue, since that relies on reordering and then batching together rendering calls to improve rendering performance, which can lead to transparency ordering issues.

commented

Author of Show Me Your Skin here. This is still an issue, and while I've been looking into a fix for this on my side, I haven't made progress as of yet. I'd definitely like to get this fixed though, any ideas?