stage.gdshader 475 B

12345678910111213141516171819
  1. shader_type canvas_item;
  2. uniform vec2 Direction = vec2(1.0,0.0);
  3. uniform float Speed = 0.08;
  4. //void vertex() {
  5. //// Called for every vertex the material is visible on.
  6. //}
  7. void fragment() {
  8. // Called for every pixel the material is visible on.
  9. COLOR = texture(TEXTURE, UV+(Direction*TIME*Speed));
  10. }
  11. //void light() {
  12. // Called for every pixel for every light affecting the CanvasItem.
  13. // Uncomment to replace the default light processing function with this one.
  14. //}