summaryrefslogtreecommitdiff
path: root/themes/src/_shaders
diff options
context:
space:
mode:
authorMatthew Kosarek <matthew@matthewkosarek.xyz>2023-09-24 16:23:43 -0400
committerMatthew Kosarek <matthew@matthewkosarek.xyz>2023-09-24 16:23:43 -0400
commitff3b7a7fa3f2ce994fb4aaaa9699c1c91fa07904 (patch)
treed62df3ff940c7976923d70e116e502c381f96b97 /themes/src/_shaders
parent61cd8d99e6a3475eaf2bd28bc24892cf1aae0398 (diff)
Working shaders again
Diffstat (limited to 'themes/src/_shaders')
-rw-r--r--themes/src/_shaders/sun.frag45
1 files changed, 1 insertions, 44 deletions
diff --git a/themes/src/_shaders/sun.frag b/themes/src/_shaders/sun.frag
index dabd7ea..8463e06 100644
--- a/themes/src/_shaders/sun.frag
+++ b/themes/src/_shaders/sun.frag
@@ -1,48 +1,5 @@
varying lowp vec4 VertexColor;
-#ifdef GL_ES
-precision mediump float;
-#endif
-
-uniform vec2 u_resolution;
-
-vec2 skew (vec2 st) {
- vec2 r = vec2(0.0);
- r.x = 1.1547*st.x;
- r.y = st.y+0.5*r.x;
- return r;
-}
-
-vec3 simplexGrid (vec2 st) {
- vec3 xyz = vec3(0.0);
-
- vec2 p = fract(skew(st));
- if (p.x > p.y) {
- xyz.xy = 1.0-vec2(p.x,p.y-p.x);
- xyz.z = p.y;
- } else {
- xyz.yz = 1.0-vec2(p.x-p.y,p.y);
- xyz.x = p.x;
- }
-
- return fract(xyz);
-}
-
void main() {
- vec2 st = gl_FragCoord.xy/u_resolution.xy;
- vec3 color = VertexColor.xyz
-
- // Scale the space to see the grid
- st *= 10.;
-
- // Show the 2D grid
- color.rg = fract(st);
-
- // Skew the 2D grid
- // color.rg = fract(skew(st));
-
- // Subdivide the grid into to equilateral triangles
- // color = simplexGrid(st);
-
- gl_FragColor = vec4(color,1.0);
+ gl_FragColor = VertexColor;
}