Clouds.fsh 638 B

123456789101112131415161718
  1. uniform sampler2D TextureSampler;
  2. uniform vec2 Position;
  3. void main()
  4. {
  5. vec4 texCoord = vec4(gl_TexCoord[0].xy, 0, 0);
  6. texCoord.x += (Position.x * 0.000250000);
  7. texCoord.y += (Position.y * 0.000250000);
  8. texCoord *= 0.500000;
  9. vec4 results = (vec4( 0.000000, 0.000000, 1.00000, 0.250000) * texture2D( TextureSampler, texCoord.xy));
  10. texCoord.x += ((Position.x * 0.000250000) + 0.250000);
  11. texCoord.y += ((Position.y * 0.000250000) - 0.150000);
  12. texCoord *= 0.400000;
  13. results += (vec4( 0.000000, 1.00000, 0.000000, 0.150000) * texture2D( TextureSampler, texCoord.xy));
  14. gl_FragColor = results;
  15. }