Add shaders everywhere!

This commit is contained in:
2024-05-19 13:22:05 +02:00
parent 1fc3378083
commit 58d0e4a416
7 changed files with 59 additions and 35 deletions
+9 -3
View File
@@ -8,10 +8,13 @@ precision mediump float;
uniform vec2 u_resolution;
uniform vec2 u_mouse;
uniform vec3 u_color_start;
uniform vec3 u_color_end;
uniform vec2 u_offset;
uniform float u_time;
void main(){
vec2 st=gl_FragCoord.xy/min(u_resolution.x,u_resolution.x)*2.;
vec2 st=(gl_FragCoord.xy+u_offset)/u_resolution;
vec2 q=vec2(0.);
q.x=fbm(st);
@@ -25,6 +28,9 @@ void main(){
float f=fbm(st+r);
f=mix(.5,1.,f);
gl_FragColor=vec4(0.,.1+f*.7,0.,1.);
vec3 color=mix(u_color_start,u_color_end,f*.3);
gl_FragColor=vec4(color,1.);
}