© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Distant HorizonsDH
Distant Horizons•2y ago•
33 replies
Wendelin

Unexpected DhApiRenderParam#dhProjectionMatrix content with Iris enabled

I'm grabbing the projection matrix from the DhApiAfterRenderEvent and use it to perform a depth test in one of my shaders. And this works fine as long as no Iris shaders are active.
Usually the projection matrix contains "normal" values, e.g.:
 4,702E-1  0,000E+0  0,000E+0 -0,000E+0
 0,000E+0  8,541E-1  0,000E+0 -0,000E+0
-0,000E+0 -0,000E+0 -1,014E+0 -4,908E+1
-0,000E+0 -0,000E+0 -1,000E+0 -0,000E+0
 4,702E-1  0,000E+0  0,000E+0 -0,000E+0
 0,000E+0  8,541E-1  0,000E+0 -0,000E+0
-0,000E+0 -0,000E+0 -1,014E+0 -4,908E+1
-0,000E+0 -0,000E+0 -1,000E+0 -0,000E+0

But when an Iris shader is active (in this case BSL but I don't think it matters) the values seem wrong:
 1,000E+0  0,000E+0  0,000E+0  0,000E+0
 0,000E+0  1,000E+0  0,000E+0  0,000E+0
 0,000E+0  0,000E+0 -1,014E+0 -4,908E+1
 0,000E+0  0,000E+0  0,000E+0  1,000E+0
 1,000E+0  0,000E+0  0,000E+0  0,000E+0
 0,000E+0  1,000E+0  0,000E+0  0,000E+0
 0,000E+0  0,000E+0 -1,014E+0 -4,908E+1
 0,000E+0  0,000E+0  0,000E+0  1,000E+0

In earlier version of DH and Iris (1.x on 1.20.1 for example) this wasn't an issue.
It seems to me that DH is not providing the correct projection matrix, which is causing the depth test in my shader to produce wrong results.

I'm using:
- DH 2.1.2-a
- Iris 1.7.2
- Indium 1.0.33
- Sodium 0.5.9
and trying to update the DH compatibility of my mod "Better Clouds"
Distant Horizons banner
Distant HorizonsJoin
Discord server for the Distant Horizons mod
71,379Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

incompatible with iris?
Distant HorizonsDHDistant Horizons / help-me
2y ago
incompatibility issue with iris
Distant HorizonsDHDistant Horizons / help-me
5mo ago
incompatibility issue with iris
Distant HorizonsDHDistant Horizons / help-me
5mo ago
Current incompatibility with iris?
Distant HorizonsDHDistant Horizons / help-me
8mo ago