Skip to content

Commit 048da1e

Browse files
committed
The potential
1 parent 03ed0f0 commit 048da1e

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

src/main/java/net/coderbot/iris/Iris.java

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.mojang.blaze3d.platform.GlDebug;
55
import com.mojang.blaze3d.platform.InputConstants;
66
import com.sun.jna.platform.unix.LibC;
7+
import net.coderbot.iris.compat.dh.DHCompat;
78
import net.coderbot.iris.config.IrisConfig;
89
import net.coderbot.iris.gl.GLDebug;
910
import net.coderbot.iris.gl.shader.ShaderCompileException;
@@ -208,6 +209,8 @@ public static void onRenderSystemInit() {
208209

209210
// Only load the shader pack when we can access OpenGL
210211
loadShaderpack();
212+
213+
DHCompat.run();
211214
}
212215

213216
public static void duringRenderSystemInit() {

src/main/java/net/coderbot/iris/compat/dh/DHCompat.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public static Matrix4f getProjection()
3232
private static MethodHandle renderShadowSolid;
3333
private static MethodHandle renderShadowTranslucent;
3434

35-
static
35+
public static void run()
3636
{
3737
try
3838
{

src/main/java/net/coderbot/iris/compat/dh/LodRendererEvents.java

+7-10
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import net.irisshaders.iris.api.v0.IrisApi;
2121
import org.joml.Matrix4f;
2222
import org.lwjgl.opengl.GL43C;
23+
import org.lwjgl.opengl.GL46C;
2324

2425
public class LodRendererEvents
2526
{
@@ -258,6 +259,11 @@ public void beforeRender(DhApiEventParam<DhApiRenderParam> event)
258259
{
259260
DhApi.Delayed.configs.graphics().ambientOcclusion().enabled().setValue(false);
260261
DhApi.Delayed.configs.graphics().fog().drawMode().setValue(EFogDrawMode.FOG_DISABLED);
262+
263+
if (event.value.renderPass == EDhApiRenderPass.OPAQUE_AND_TRANSPARENT)
264+
{
265+
Iris.logger.error("Unexpected; somehow the Opaque + Translucent pass ran with shaders on.");
266+
}
261267
}
262268
else
263269
{
@@ -266,14 +272,6 @@ public void beforeRender(DhApiEventParam<DhApiRenderParam> event)
266272
}
267273

268274

269-
270-
if (event.value.renderPass == EDhApiRenderPass.OPAQUE_AND_TRANSPARENT)
271-
{
272-
Iris.logger.error("Unexpected ");
273-
}
274-
275-
276-
277275
// cleanup
278276
if (event.value.renderPass == EDhApiRenderPass.OPAQUE)
279277
{
@@ -347,8 +345,7 @@ public void beforeRender(DhApiEventParam<DhApiRenderParam> event)
347345
Matrix4f projection = CapturedRenderingState.INSTANCE.getGbufferProjection();
348346
//float nearClip = DhApi.Delayed.renderProxy.getNearClipPlaneDistanceInBlocks(partialTicks);
349347
//float farClip = (float) ((double) (DHCompatInternal.getDhBlockRenderDistance() + 512) * Math.sqrt(2.0));
350-
RenderSystem.disableCull();
351-
348+
GL46C.glDisable(GL46C.GL_CULL_FACE);
352349
//Iris.logger.info("event near clip: "+event.value.nearClipPlane+" event far clip: "+event.value.farClipPlane+
353350
// " \niris near clip: "+nearClip+" iris far clip: "+farClip);
354351

src/main/java/net/coderbot/iris/pipeline/newshader/ExtendedShader.java

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.mojang.blaze3d.vertex.PoseStack;
1111
import com.mojang.blaze3d.vertex.VertexFormat;
1212
import net.coderbot.iris.Iris;
13+
import net.coderbot.iris.gl.GLDebug;
1314
import net.coderbot.iris.gl.IrisRenderSystem;
1415
import net.coderbot.iris.gl.blending.AlphaTest;
1516
import net.coderbot.iris.gl.blending.BlendMode;
@@ -45,10 +46,12 @@
4546
import org.lwjgl.opengl.GL20C;
4647
import org.lwjgl.opengl.GL30C;
4748
import org.lwjgl.opengl.GL32C;
49+
import org.lwjgl.opengl.KHRDebug;
4850

4951
import java.io.IOException;
5052
import java.util.HashMap;
5153
import java.util.List;
54+
import java.util.Locale;
5255
import java.util.function.BiConsumer;
5356
import java.util.function.Consumer;
5457
import java.util.function.IntSupplier;

0 commit comments

Comments
 (0)