Rename example rgb_uv_distort to multistep_distort
This commit is contained in:
parent
1d9f838668
commit
6c1ec9ed2c
2 changed files with 2 additions and 2 deletions
20
examples/multistep_distort.gdshader
Normal file
20
examples/multistep_distort.gdshader
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue