You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

33 lines
671 B

  1. -- GLSL.Vert --
  2. #version 120
  3. void main()
  4. {
  5. gl_Position=gl_Vertex;
  6. gl_TexCoord[0]=gl_MultiTexCoord0;
  7. }
  8. -- GLSL.Frag --
  9. #version 120
  10. uniform sampler2D texture;
  11. uniform sampler2D texture_buffer1;
  12. uniform sampler2D texture_buffer2;
  13. uniform sampler2D texture_buffer3;
  14. uniform vec2 screen_size;
  15. uniform float time;
  16. uniform float value1;
  17. uniform float value2;
  18. void main(void)
  19. {
  20. vec2 p=gl_TexCoord[0].xy;
  21. vec4 source=texture2D(texture,p);
  22. vec4 buffer1=texture2D(texture_buffer1,p);
  23. vec4 buffer2=texture2D(texture_buffer2,p);
  24. vec4 buffer3=texture2D(texture_buffer3,p);
  25. vec4 color=source*value1+buffer1*value2+buffer2*value2+buffer3*value2;
  26. gl_FragColor=color;
  27. }