retuned chromatic aberration
This commit is contained in:
parent
a5a2b8c29f
commit
8401f8bcf0
2 changed files with 5 additions and 5 deletions
|
@ -39,7 +39,7 @@ void main() {
|
|||
|
||||
// physical post-processing effects
|
||||
#ifdef aberration
|
||||
color.rb = aberrate(color).rb;
|
||||
color.rb = aberrate().rb;
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue