corrected color positions for chromatic aberration

This commit is contained in:
Valerie Wolfe 2024-05-17 21:19:42 -04:00
parent 86ad465ae2
commit 410bbdbf16

View file

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