performance.glslf 928 B

12345678910111213141516171819202122232425262728293031
  1. #version GLSL_VERSION
  2. #include <precision_statement.glslf>
  3. #include <std.glsl>
  4. uniform sampler2D u_color;
  5. /*==============================================================================
  6. SHADER INTERFACE
  7. ==============================================================================*/
  8. GLSL_IN vec2 v_texcoord;
  9. //------------------------------------------------------------------------------
  10. GLSL_OUT vec4 GLSL_OUT_FRAG_COLOR;
  11. /*==============================================================================
  12. MAIN
  13. ==============================================================================*/
  14. void main(void) {
  15. vec4 color = vec4(0.0);
  16. for (int i = 0; i < 10; i++) {
  17. vec2 uv_rand = vec2(fract(v_texcoord * vec2(i) * vec2(1.431, 3.921)));
  18. color += 0.01 * GLSL_TEXTURE(u_color, uv_rand);
  19. }
  20. GLSL_OUT_FRAG_COLOR = color;
  21. }