aspect ratio

This commit is contained in:
2024-04-27 17:36:26 +02:00
parent fd64ee4b02
commit c8b4375ba5
7 changed files with 161 additions and 0 deletions

21
learning/shapes/main.frag Normal file
View File

@@ -0,0 +1,21 @@
#ifdef GL_ES
precision mediump float;
#endif
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform float u_time;
varying vec2 v_texcoord;
void main(void) {
vec4 color = vec4(vec3(0.0), 1.0);
vec2 pixel = 1.0/u_resolution.xy;
vec2 st = gl_FragCoord.xy * pixel;
vec2 uv = v_texcoord;
color.rgb = vec3(st.x,st.y,abs(sin(u_time)));
gl_FragColor = color;
}