copy.glsl 449 B

1234567891011121314151617181920212223242526
  1. //@renderpasses 0
  2. uniform sampler2D r_SourceBuffer;
  3. uniform vec2 r_SourceBufferScale;
  4. varying vec2 v_SourceBufferCoords;
  5. //@vertex
  6. attribute vec2 a_Position;
  7. attribute vec2 a_TexCoord0;
  8. void main(){
  9. v_SourceBufferCoords=a_TexCoord0 * r_SourceBufferScale;
  10. gl_Position=vec4( a_Position*2.0-1.0,-1.0,1.0 );
  11. }
  12. //@fragment
  13. void main(){
  14. gl_FragColor=vec4( pow( texture2D( r_SourceBuffer,v_SourceBufferCoords ).rgb,vec3( 1.0/2.2 ) ),1.0 );
  15. }