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.
 
 
 
 
 

29 lines
461 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_prv;
  12. uniform vec2 screen_size;
  13. uniform float time;
  14. uniform float value;
  15. void main(void)
  16. {
  17. vec2 p=gl_TexCoord[0].xy;
  18. vec4 source=texture2D(texture,p);
  19. vec4 remanency=texture2D(texture_prv,p);
  20. vec4 color=source*(1.0-value)+remanency*value;
  21. gl_FragColor=color;
  22. }