
Immersive Portals Render Over Blocks when LDLib is Installed
SalmonSays opened this issue ยท 2 comments
Tested with 1.20.1 Forge:
"ldlib-forge-1.20.1-1.0.35.jar"
"immersive-portals-3.0.1-mc1.20.1-forge.jar"
"oculus-mc1.20.1-1.8.0.jar"
"embeddium-0.3.31+mc1.20.1.jar"
"cloth-config-11.1.136-forge.jar"
Cross-posting from GregTech Modern Issues
It looks like LDLib is somehow messing with the stencil buffer and possibly causing Immersive Portals Forge to fallback on compatibility rendering mode?
What should look like this ^
Instead looks like this ^
This issue was discovered because LDLib is an embedded dependency inside Gregtech Community Edition Modern for 1.20.1, and its inclusion alongside Iris Shaders and Immersive Portals causes this. Notably, this issue only appears when shaders are applied. When shaders are disabled, rendering layers happen in the right order with no occlusion.
Steps to Reproduce
Add shaders through Iris (BSL, etc), coupled with Immersive Portals and LDLib. Build a nether portal, put a wall in front of it (or use a hand from the player viewmodel) and it will clip as the wrong layer is rendered on top. The problem disappears when LDLib is removed/disabled.
Additional Information
https://discord.com/channels/662271867431682058/1344750921178943528
Clearly there is some weird interaction between LDLib and Immersive Portals. Imm. Portals seems to be falling back to a "forced compatibility" mode, what's not clear to me is if LDLib is doing something weird to the stencil buffer causing that to happen in the first place. If so, why is LDLib modifying the stencil buffer without a way to disable this behavior from a config? Notably, in my heavy test pack of ~300 mods (including some you'd ordinarily expect to cause issues- like Distant Horizons), LDLib is the only one to cause this behavior.