This repository has been archived on 2025-10-11. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Fragmented/examples/rgb_uv_distort.gdshader

14 lines
254 B
Text
Raw Normal View History

shader_type canvas_item;
//!load ./swamp.jpg
const float strength = 0.1;
void fragment() {
vec2 uv = UV;
float b = (COLOR.r + COLOR.g + COLOR.b) / 3.0;
uv.x = mix(uv.x, b, strength);
uv.y = mix(uv.y, b, strength);
COLOR = texture(TEXTURE, uv);
}