Transparency/Translucent Issue with Mod Rendering
I'm currently developing a Fabric mod which uses FAPI's world rendering to create elytra contrails. I'm struggling with a rendering issue specifically when Iris Shaders is installed(no shaders enabled). I am unsure if my code is at fault.
When there is a semi-transparent block(e.g. water or colored glass) behind my semi-transparent contrails, the block doesn't get fully rendered. I had this issue without Iris installed, but was able to fix it by:
Maybe helpful info:
Thanks!
When there is a semi-transparent block(e.g. water or colored glass) behind my semi-transparent contrails, the block doesn't get fully rendered. I had this issue without Iris installed, but was able to fix it by:
- Changing my
WorldRenderEventscall fromBEFORE_DEBUG_RENDERtoAFTER_TRANSLUCENTorLAST. This fix does not work with Iris installed though. - Changing the shader program on my contrail render layer from the tripwire program to the translucent program.
- Adding the translucent target to my contrail render layer.
Maybe helpful info:
- This is my contrail renderer class (https://github.com/Superkat32/Jet-Lag/blob/master/src/main/java/net/superkat/jetlag/rendering/ContrailRenderer.java). I'm wondering if the drawing of vertex consumers at line 208 and 215 is causing any issues? Code around line 76 may be helpful to know as well(RenderSystem stuff).
- My WorldRenderEvents event call is in the
JetLagClientclass at line 62. UsingAFTER_TRANSLUCENTorLASTfixes the issue without Iris, but with Iris installed not only reintroduces the transparency issue, but also makes the contrails move slightly when the camera is moving. UsingBEFORE_DEBUG_RENDERdoes not introduce the camera issue with Iris, but still has the transparency issue. - I have tested with:
- Sodium 0.5.11 + Iris 1.7.3
- Sodium 0.6.0 beta 2 + Iris 1.8.3 beta 4
and the issue still persists.
- Sodium 0.6.0 beta 2 + Iris 1.8.3 beta 4
- Sodium 0.5.11 + Iris 1.7.3
Thanks!

