mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
application component state switches, chromatic aberration post process filter, minor ai logic tweaks, minor cab controls tweaks, minor bug fixes
This commit is contained in:
21
shaders/postfx_chromaticaberration.frag
Normal file
21
shaders/postfx_chromaticaberration.frag
Normal file
@@ -0,0 +1,21 @@
|
||||
in vec2 f_coords;
|
||||
|
||||
layout(location = 0) out vec4 out_color;
|
||||
|
||||
#texture (color_tex, 0, RGB)
|
||||
uniform sampler2D iChannel0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float amount = 0.001;
|
||||
|
||||
vec2 uv = f_coords;
|
||||
vec3 col;
|
||||
col.r = texture( iChannel0, vec2(uv.x+amount,uv.y) ).r;
|
||||
col.g = texture( iChannel0, uv ).g;
|
||||
col.b = texture( iChannel0, vec2(uv.x-amount,uv.y) ).b;
|
||||
|
||||
col *= (1.0 - amount * 0.5);
|
||||
|
||||
out_color = vec4(col,1.0);
|
||||
}
|
||||
Reference in New Issue
Block a user