1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-28 06:51:54 +08:00

添加Pixelization着色器,支持像素化效果

This commit is contained in:
2025-08-26 10:49:57 +08:00
parent 61a4cabf15
commit aae36b740e
+7
View File
@@ -0,0 +1,7 @@
shader_type canvas_item;
uniform int pixelSize;
void fragment() {
vec2 uv = UV - mod(UV, vec2(float(pixelSize)) / vec2(textureSize(TEXTURE, 0)));
COLOR = texture(TEXTURE, uv);
}