final.glsl 761 B

1234567891011121314151617181920212223
  1. #pragma anki vertShaderBegins
  2. #pragma anki include "shaders/simple_vert.glsl"
  3. #pragma anki fragShaderBegins
  4. uniform sampler2D rasterImage;
  5. varying vec2 texCoords;
  6. void main()
  7. {
  8. //if( gl_FragCoord.x > 0.5 ) discard;
  9. gl_FragColor.rgb = texture2D( rasterImage, texCoords ).rgb;
  10. /*vec4 c = texture2D( rasterImage, texCoords );
  11. if( c.r == 0.0 && c.g == 0.0 && c.b==0.0 && c.a != 0.0 )*/
  12. //gl_FragColor.rgb = vec3( texture2D( rasterImage, texCoords ).a );
  13. //gl_FragColor.rgb = MedianFilter( rasterImage, texCoords );
  14. //gl_FragColor.rgb = vec3( gl_FragCoord.xy/tex_size_, 0.0 );
  15. //gl_FragColor.rgb = vec3( gl_FragCoord.xy*vec2( 1.0/R_W, 1.0/R_H ), 0.0 );
  16. //gl_FragColor.rgb = texture2D( rasterImage, gl_FragCoord.xy/textureSize(rasterImage,0) ).rgb;
  17. }