diff --git a/shaders/module/aberration.frag b/shaders/module/aberration.frag index fcb5eb4..9a68ecb 100644 --- a/shaders/module/aberration.frag +++ b/shaders/module/aberration.frag @@ -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); }