Explorar o código

Remove dead shaders

rexim %!s(int64=2) %!d(string=hai) anos
pai
achega
0374919bb2
Modificáronse 3 ficheiros con 0 adicións e 60 borrados
  1. 0 8
      shaders/camera.vert
  2. 0 24
      shaders/free_glyph.frag
  3. 0 28
      shaders/free_glyph.vert

+ 0 - 8
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;
-}

+ 0 - 24
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;
-}

+ 0 - 28
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;
-}