From 17fb8d34ed80f6147052886976b0e911247aa5e0 Mon Sep 17 00:00:00 2001 From: Jozufozu Date: Wed, 15 Dec 2021 13:27:06 -0800 Subject: [PATCH] Fix #extension crash on intel --- .../java/com/jozufozu/flywheel/backend/pipeline/WorldShader.java | 1 + .../assets/flywheel/flywheel/shaders/context/world.glsl | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShader.java b/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShader.java index 2cb7defbb..cffa9142b 100644 --- a/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShader.java +++ b/src/main/java/com/jozufozu/flywheel/backend/pipeline/WorldShader.java @@ -56,6 +56,7 @@ public class WorldShader { finalSource.append("#version ") .append(template.getVersion()) .append('\n') + .append("#extension GL_ARB_conservative_depth : enable\n") .append("#define ") .append(type.define) // special case shader type declaration .append('\n') diff --git a/src/main/resources/assets/flywheel/flywheel/shaders/context/world.glsl b/src/main/resources/assets/flywheel/flywheel/shaders/context/world.glsl index 51afad2eb..1503ed993 100644 --- a/src/main/resources/assets/flywheel/flywheel/shaders/context/world.glsl +++ b/src/main/resources/assets/flywheel/flywheel/shaders/context/world.glsl @@ -28,7 +28,6 @@ void FLWFinalizeWorldPos(inout vec4 worldPos) { // optimize discard usage #if defined(ALPHA_DISCARD) #if defined(GL_ARB_conservative_depth) -#extension GL_ARB_conservative_depth : enable layout (depth_greater) out float gl_FragDepth; #endif #endif