mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 08:55:35 +00:00
Added VFEZ
This commit is contained in:
parent
273efaef03
commit
6d572503cb
59 changed files with 5796 additions and 0 deletions
18
VFEZ/Shaders/Effects/vfez_chromatic_aberration.gdshaderinc
Normal file
18
VFEZ/Shaders/Effects/vfez_chromatic_aberration.gdshaderinc
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
group_uniforms chromatic_aberration;
|
||||
uniform float chromatic_aberration_amount: hint_range(0.0, 1.0) = 1.;
|
||||
uniform float chromatic_aberration_alpha: hint_range(0.0, 1.0) = 0.4;
|
||||
group_uniforms;
|
||||
|
||||
vec4 chromatic_aberration(vec4 color, vec2 uv, sampler2D main_texture)
|
||||
{
|
||||
vec4 r = texture(main_texture,
|
||||
uv + vec2(chromatic_aberration_amount / 10., 0.));
|
||||
|
||||
vec4 b = texture(main_texture,
|
||||
uv + vec2(-chromatic_aberration_amount / 10., 0.));
|
||||
|
||||
color = vec4(r.r * r.a, color.g, b.b * b.a,
|
||||
max(max(r.a, b.a) * chromatic_aberration_alpha, color.a));
|
||||
|
||||
return color;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue