fatty.gdshader 315 B

1234567891011121314151617
  1. shader_type canvas_item;
  2. render_mode blend_mix;
  3. uniform float fattyness = 2.0;
  4. void fragment() {
  5. vec2 ruv = UV - vec2(0.5, 0.5);
  6. vec2 dir = normalize(ruv);
  7. float len = length(ruv);
  8. len = pow(len * 2.0, fattyness) * 0.5;
  9. ruv = len * dir;
  10. vec4 col = texture(TEXTURE, ruv + vec2(0.5, 0.5));
  11. COLOR = col;
  12. }