From 3a975db66a3711f34e8b64bb27a8eaca79fdeca9 Mon Sep 17 00:00:00 2001 From: Alex Pickering Date: Sun, 1 Feb 2026 13:14:32 -0600 Subject: Initial commit --- src/shaders/world.frag | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/shaders/world.frag (limited to 'src/shaders/world.frag') diff --git a/src/shaders/world.frag b/src/shaders/world.frag new file mode 100644 index 0000000..9cc1bc9 --- /dev/null +++ b/src/shaders/world.frag @@ -0,0 +1,29 @@ +precision mediump float; +varying vec2 textureuv; // uv +varying float radius; +uniform sampler2D textures; +uniform sampler2D emissives; +uniform sampler2D normals; +varying mat3 light1; // position, color, intensity-fadetime-? +uniform float time; +varying vec4 v_color; +void main() { + + vec2 uv = textureuv; + //vec2 uv = gl_FragCoord.xy; + //vec3 view_origin = vec3(0., 0., -3.); + //vec3 view_direction = vec3(uv, 3); + //vec3 screen_intersection = vec3(uv.x, uv.y, 0.); + vec4 raw = texture2D(textures,uv); + gl_FragColor = raw; + //gl_FragColor = texture2D(textures,uv);// + vec4(uv.xy / 4.,0.,1.); + //if(raw.r == 1.0 && raw.g == 1.0 && raw.b == 1.0){ + //gl_FragColor = vec4(0.9058, 0.9215, 0.7725, 1); + //} else if(raw.r == 0.0 && raw.g == 0.0 && raw.b == 0.0){ + //gl_FragColor = vec4(0.298, 0.267, 0.216, 1); + //} else { + //gl_FragColor = raw; + //} +} + //gl_FragColor = vec4(gl_FragCoord.z, gl_FragCoord.z, gl_FragCoord.z, 1.); + //gl_FragColor = texture2D(textures,screen_intersection.xy); -- cgit v1.2.3-70-g09d2