commit 0374919bb2b8292146b2b72c1b7d1c3c860b46a0
parent ef90e5418796ab4dee68a4e07c6fbb293b24fa01
Author: rexim <reximkut@gmail.com>
Date: Mon, 9 Jan 2023 01:09:03 +0700
Remove dead shaders
Diffstat:
3 files changed, 0 insertions(+), 60 deletions(-)
diff --git a/shaders/camera.vert b/shaders/camera.vert
@@ -1,8 +0,0 @@
-uniform vec2 resolution;
-uniform float camera_scale;
-uniform vec2 camera_pos;
-
-vec2 camera_project(vec2 point)
-{
- return 2.0 * (point - camera_pos) * camera_scale / resolution;
-}
diff --git a/shaders/free_glyph.frag b/shaders/free_glyph.frag
@@ -1,24 +0,0 @@
-#version 330 core
-
-uniform sampler2D font;
-uniform float time;
-uniform vec2 resolution;
-
-in vec2 uv;
-in vec2 glyph_uv_pos;
-in vec2 glyph_uv_size;
-in vec4 glyph_fg_color;
-in vec4 glyph_bg_color;
-
-vec3 hsl2rgb(vec3 c) {
- vec3 rgb = clamp(abs(mod(c.x*6.0+vec3(0.0,4.0,2.0),6.0)-3.0)-1.0, 0.0, 1.0);
- return c.z + c.y * (rgb-0.5)*(1.0-abs(2.0*c.z-1.0));
-}
-
-void main() {
- vec2 t = glyph_uv_pos + glyph_uv_size * uv;
- vec4 tc = texture(font, t);
- vec2 frag_uv = gl_FragCoord.xy / resolution;
- vec4 rainbow = vec4(hsl2rgb(vec3((time + frag_uv.x + frag_uv.y), 0.5, 0.5)), 1.0);
- gl_FragColor = glyph_bg_color * (1.0 - tc.x) + tc.x * glyph_fg_color * rainbow;
-}
diff --git a/shaders/free_glyph.vert b/shaders/free_glyph.vert
@@ -1,28 +0,0 @@
-#version 330 core
-
-uniform vec2 resolution;
-uniform float time;
-
-layout(location = 0) in vec2 pos;
-layout(location = 1) in vec2 size;
-layout(location = 2) in vec2 uv_pos;
-layout(location = 3) in vec2 uv_size;
-layout(location = 4) in vec4 fg_color;
-layout(location = 5) in vec4 bg_color;
-
-out vec2 uv;
-out vec2 glyph_uv_pos;
-out vec2 glyph_uv_size;
-out vec4 glyph_fg_color;
-out vec4 glyph_bg_color;
-
-vec2 camera_project(vec2 point);
-
-void main() {
- uv = vec2(float(gl_VertexID & 1), float((gl_VertexID >> 1) & 1));
- gl_Position = vec4(camera_project(uv * size + pos), 0.0, 1.0);
- glyph_uv_pos = uv_pos;
- glyph_uv_size = uv_size;
- glyph_fg_color = fg_color;
- glyph_bg_color = bg_color;
-}