hp_waterfall.fp 397 B

1234567891011121314151617181920
  1. /*
  2. * HPack: "Waterfall" shader
  3. *
  4. * Basically a scroll-down shader. Seems redundant
  5. * on its own, but it's mainly meant to be used
  6. * alongside the hp_gradientfall shaders.
  7. */
  8. uniform float timer;
  9. vec4 Process(vec4 color)
  10. {
  11. vec2 texCoord = vTexCoord.st;
  12. ivec2 texSize = textureSize(tex, 0);
  13. texCoord.y = mod(texCoord.y - (timer / texSize.y), 1.0);
  14. return getTexel(texCoord) * color;
  15. }