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.
 
 
 
 
 

32 lines
527 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 step;
  15. uniform float value1;
  16. uniform float value2;
  17. void main(void)
  18. {
  19. vec2 p=gl_TexCoord[0].xy;
  20. vec4 source=texture2D(texture_prv,p);
  21. vec4 glow=texture2D(texture,p);
  22. source=smoothstep(step,1.0,source);
  23. vec4 color=glow*value1+source*value2;
  24. gl_FragColor=color;
  25. }