mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-07-08 10:11:16 +00:00
Added VFEZ
This commit is contained in:
parent
273efaef03
commit
6d572503cb
59 changed files with 5796 additions and 0 deletions
11
VFEZ/Shaders/Effects/vfez_uv_pixelate.gdshaderinc
Normal file
11
VFEZ/Shaders/Effects/vfez_uv_pixelate.gdshaderinc
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
group_uniforms uv_pixelate;
|
||||
uniform int uv_pixelate_size: hint_range(4, 512) = 32;
|
||||
group_uniforms;
|
||||
|
||||
vec2 uv_pixelate(vec2 uv, vec2 viewport_size)
|
||||
{
|
||||
float aspect_ratio = viewport_size.x / viewport_size.y;
|
||||
vec2 pixel_size = vec2(float(uv_pixelate_size), float(uv_pixelate_size) * aspect_ratio);
|
||||
uv = floor(uv * pixel_size) / pixel_size;
|
||||
return uv;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue