summaryrefslogtreecommitdiff
path: root/drivers/gles3/shaders/canvas_shadow.glsl
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-11-02 17:12:20 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-11-02 17:12:20 +0100
commitcb1931b2715961dc663fa4e411850e4882722f14 (patch)
tree95405fb98f9780adcfe911241dfcdaeb5d4ca600 /drivers/gles3/shaders/canvas_shadow.glsl
parenteddaab17eaffeef3ad38612bf72a901fd0ffcde5 (diff)
parent2ec234ff67496c1410df2ab14c03e144889adc8d (diff)
Merge pull request #67639 from clayjohn/GLES3-2d-shadows
Add 2D shadows and canvas SDF to OpenGL3 renderer
Diffstat (limited to 'drivers/gles3/shaders/canvas_shadow.glsl')
-rw-r--r--drivers/gles3/shaders/canvas_shadow.glsl60
1 files changed, 0 insertions, 60 deletions
diff --git a/drivers/gles3/shaders/canvas_shadow.glsl b/drivers/gles3/shaders/canvas_shadow.glsl
deleted file mode 100644
index 94485abd11..0000000000
--- a/drivers/gles3/shaders/canvas_shadow.glsl
+++ /dev/null
@@ -1,60 +0,0 @@
-/* clang-format off */
-[vertex]
-
-#ifdef USE_GLES_OVER_GL
-#define lowp
-#define mediump
-#define highp
-#else
-precision highp float;
-precision highp int;
-#endif
-
-layout(location = 0) in highp vec3 vertex;
-
-uniform highp mat4 projection_matrix;
-/* clang-format on */
-uniform highp mat4 light_matrix;
-uniform highp mat4 model_matrix;
-uniform highp float distance_norm;
-
-out highp vec4 position_interp;
-
-void main() {
- gl_Position = projection_matrix * (light_matrix * (model_matrix * vec4(vertex, 1.0)));
- position_interp = gl_Position;
-}
-
-/* clang-format off */
-[fragment]
-
-#ifdef USE_GLES_OVER_GL
-#define lowp
-#define mediump
-#define highp
-#else
-#if defined(USE_HIGHP_PRECISION)
-precision highp float;
-precision highp int;
-#else
-precision mediump float;
-precision mediump int;
-#endif
-#endif
-
-in highp vec4 position_interp;
-/* clang-format on */
-
-void main() {
- highp float depth = ((position_interp.z / position_interp.w) + 1.0) * 0.5 + 0.0; // bias
-
-#ifdef USE_RGBA_SHADOWS
-
- highp vec4 comp = fract(depth * vec4(255.0 * 255.0 * 255.0, 255.0 * 255.0, 255.0, 1.0));
- comp -= comp.xxyz * vec4(0.0, 1.0 / 255.0, 1.0 / 255.0, 1.0 / 255.0);
- frag_color = comp;
-#else
-
- frag_color = vec4(depth);
-#endif
-}