chromatic aberration is now dynamic

This commit is contained in:
Valerie Wolfe 2024-04-18 11:41:47 -04:00
parent 9edd7782c6
commit 038ff7f142

View file

@ -2,8 +2,9 @@
vec2 caOffset = vec2(pixelSize / viewWidth, 0);
vec3 aberrate() {
float red = texture2D(gcolor, texcoord - caOffset).r;
float blue = texture2D(gcolor, texcoord + caOffset).b;
vec2 offset = caOffset * abs(cos(texcoord * 3.14));
float red = texture2D(gcolor, texcoord - offset).r;
float blue = texture2D(gcolor, texcoord + offset).b;
return vec3(red, 0, blue);
}