retuned chromatic aberration

This commit is contained in:
Valerie Wolfe 2024-05-05 14:48:27 -04:00
parent 981ebea8c8
commit f89d8ac3c9
2 changed files with 5 additions and 5 deletions

View file

@ -39,7 +39,7 @@ void main() {
// physical post-processing effects
#ifdef aberration
color.rb = aberrate(color).rb;
color.rb = aberrate().rb;
#endif

View file

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