Rename example rgb_uv_distort to multistep_distort

This commit is contained in:
ChaoticByte 2025-01-06 22:15:00 +01:00
parent 1d9f838668
commit 6c1ec9ed2c
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -0,0 +1,20 @@
shader_type canvas_item;
//!steps 9
//!load ./swamp.jpg
const float strength = 0.01;
void fragment() {
float v;
if (STEP % 3 == 0) {
v = COLOR.r; // 3 times
} else if (STEP % 3 == 0) {
v = COLOR.g; // 3 times
} else {
v = COLOR.b; // 3 times
}
vec2 uv = UV;
uv.y -= v * strength;
COLOR = texture(TEXTURE, uv);
}