Fix shaders when far clip fading is active
This commit is contained in:
@@ -110,8 +110,6 @@ public class DhFadeRenderer
|
||||
|
||||
public void render(Mat4f mcModelViewMatrix, Mat4f mcProjectionMatrix, float partialTicks, IProfilerWrapper profiler)
|
||||
{
|
||||
GLState mcState = new GLState();
|
||||
|
||||
try
|
||||
{
|
||||
profiler.push("Fade Generate");
|
||||
@@ -149,10 +147,6 @@ public class DhFadeRenderer
|
||||
}
|
||||
finally
|
||||
{
|
||||
// make sure we always revert to MC's state to prevent GL state corruption
|
||||
// this is especially important on MC 1.16.5 or when other rendering mods are present
|
||||
mcState.restore();
|
||||
|
||||
profiler.pop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -243,7 +243,10 @@ public class LodRenderer
|
||||
}
|
||||
|
||||
// far plane clip fading
|
||||
if (Config.Client.Advanced.Graphics.Quality.dhFadeFarClipPlane.get())
|
||||
if (Config.Client.Advanced.Graphics.Quality.dhFadeFarClipPlane.get()
|
||||
// the fade shader messes with the GL state in a way Iris doesn't like,
|
||||
// so skip it if a shader is active
|
||||
&& !IRIS_ACCESSOR.isShaderPackInUse())
|
||||
{
|
||||
profiler.popPush("Fade Far Clip Fade");
|
||||
DhFadeRenderer.INSTANCE.render(
|
||||
|
||||
Reference in New Issue
Block a user