gevonden :)

This commit is contained in:
2024-04-27 18:49:37 +02:00
parent c8b4375ba5
commit d40beb27fb

View File

@@ -11,8 +11,14 @@ uniform float u_time;
void main() { void main() {
vec2 st = gl_FragCoord.xy/u_resolution; vec2 st = gl_FragCoord.xy/u_resolution;
// vec3 color = vec3(0.0,0.0,0.0); // vec3 color = vec3(0.0,0.0,0.0);
// find a way to make this a circle even when non 1:1 aspect ratio
float pct = distance(gl_FragCoord.xy, (vec2(0.5)*u_resolution)) // find a way to make this a circle even when non 1:1 aspect ratio // i found something, although i cannot say with full competence it works 100%
vec3 color = vec3(pct); //float variable = sqrt((u_resolution.x * u_resolution.x) + (u_resolution.y * u_resolution.y));
gl_FragColor = vec4(color, 1.0); //float variable = (u_resolution.x + u_resolution.y)/((sin(u_time) + 1.0) / 2.0);
float variable = ((u_resolution.x + u_resolution.y)*5.0)/7.0;
float pct = distance(gl_FragCoord.xy, (vec2(0.5)*u_resolution)) / variable;
vec3 color = vec3(1.0-step(0.1,pct));
//vec3 color = vec3(pct);
float test = 1.0;
gl_FragColor = vec4(color, test);
} }