Iris
Iris copied to clipboard
[Immersive Portals] Audit references to Iris from Immersive Portals
It would be preferable to see if all references to internal Iris code can either be handled within Iris or be replaced with proper APIs. This would avoid having Immersive Portals break with internal Iris refactors.
This reference is because Immersive Portals tries to patch the shaders that Iris provides (see https://github.com/IrisShaders/Iris/issues/805):
- https://github.com/qouteall/ImmersivePortalsMod/blob/599ce5e1f6e531d5cfee8e57578f269c77c92b91/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/compat/sodium_compatibility/mixin/MixinIrisSodiumSodiumTerrainPipeline.java
These references are only needed since Iris updates SystemTimeUniforms in GameRenderer#render instead of GameRenderer#renderWorld, this should be fixable within Iris:
- https://github.com/qouteall/ImmersivePortalsMod/blob/f918113eed2f58289f5f4c0474542ff05762cf02/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/compat/iris_compatibility/IrisCompatibilityPortalRenderer.java#L114
- https://github.com/qouteall/ImmersivePortalsMod/blob/f918113eed2f58289f5f4c0474542ff05762cf02/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/compat/iris_compatibility/IrisPortalRenderer.java#L293
This reference is needed to save/restore the WorldRenderer.pipeline object cached by Iris during world rendering:
- https://github.com/qouteall/ImmersivePortalsMod/blob/fab9064e3d3fcd1061e584bd8503702122089003/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/render/MyGameRenderer.java
This reference helps with saving/restoring the pipeline field, but also allows Immersive Portals to check if Iris is using shaders for rendering.
- https://github.com/qouteall/ImmersivePortalsMod/blob/f918113eed2f58289f5f4c0474542ff05762cf02/imm_ptl_core/src/main/java/qouteall/imm_ptl/core/compat/iris_compatibility/IrisInterface.java