From 31032664064b36709db603bd055316d5fc780edd Mon Sep 17 00:00:00 2001 From: AnyOldName3 Date: Sat, 13 Mar 2021 01:31:35 +0000 Subject: [PATCH] Add correct preprocessor check when enabling extension --- files/shaders/groundcover_fragment.glsl | 4 ++++ files/shaders/shadowcasting_fragment.glsl | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/files/shaders/groundcover_fragment.glsl b/files/shaders/groundcover_fragment.glsl index c3339ba76..bc84ded61 100644 --- a/files/shaders/groundcover_fragment.glsl +++ b/files/shaders/groundcover_fragment.glsl @@ -1,5 +1,9 @@ #version 120 +#if @useGPUShader4 + #extension EXT_gpu_shader4: require +#endif + #define GROUNDCOVER #if @diffuseMap diff --git a/files/shaders/shadowcasting_fragment.glsl b/files/shaders/shadowcasting_fragment.glsl index ea8a63313..a83e155ca 100644 --- a/files/shaders/shadowcasting_fragment.glsl +++ b/files/shaders/shadowcasting_fragment.glsl @@ -1,6 +1,8 @@ #version 120 -#extension EXT_gpu_shader4: enable +#if @useGPUShader4 + #extension EXT_gpu_shader4: require +#endif uniform sampler2D diffuseMap; varying vec2 diffuseMapUV;