Skip to content

Commit

Permalink
Create audiovisual_feedback.glsl
Browse files Browse the repository at this point in the history
  • Loading branch information
algroznykh authored Apr 16, 2022
1 parent 3dd5f0c commit f6e7b9a
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions audiovisual_feedback.glsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
float circle(vec2 p, float r) {
return length(p) - pow(r, 2.);
}

mat2 rot(float q) {
return mat2(cos(q), -sin(q), sin(q), cos(q));
}

void main() {

vec4 tex;

vec4 sound = texture2D(channel1, uvN());


vec2 uvm = uv() * rot(sound.x) ;
uvm *= .5;
uvm += .5;
tex = texture2D(channel0, uvm);

tex *= 56.9;

vec3 color;


color *- circle(uv(), 1.);


gl_FragColor = tex + vec4(color, 1.);


// gl_FragColor = sound * .5;


}

0 comments on commit f6e7b9a

Please sign in to comment.