From 2b3f2ee3720856b09143b9043da2b3009daf5fdd Mon Sep 17 00:00:00 2001 From: clayjohn Date: Thu, 28 Mar 2019 22:14:41 -0700 Subject: [PATCH] keep DEPTH from causing compile error in GLES2 (cherry picked from commit 5056b4a02cbb71aea7f424d0e400175787fb0db6) --- drivers/gles2/shaders/scene.glsl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gles2/shaders/scene.glsl b/drivers/gles2/shaders/scene.glsl index 7e59b63935d..5d21c679bad 100644 --- a/drivers/gles2/shaders/scene.glsl +++ b/drivers/gles2/shaders/scene.glsl @@ -1466,6 +1466,9 @@ void main() { float anisotropy = 0.0; vec2 anisotropy_flow = vec2(1.0, 0.0); float sss_strength = 0.0; //unused + // gl_FragDepth is not available in GLES2, so writing to DEPTH is not converted to gl_FragDepth by Godot compiler resulting in a + // compile error because DEPTH is not a variable. + float m_DEPTH = 0.0; float alpha = 1.0; float side = 1.0;