chromatic aberration is now dynamic
This commit is contained in:
parent
9edd7782c6
commit
038ff7f142
1 changed files with 3 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue