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

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

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"
Was this page helpful?