sdrblurtest

diff sdr/hblur.glsl @ 1:e8fc0c9754c9

added fps counter
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 Oct 2015 17:46:02 +0300
parents 26513fdda566
children
line diff
     1.1 --- a/sdr/hblur.glsl	Thu Oct 17 08:19:56 2013 +0300
     1.2 +++ b/sdr/hblur.glsl	Wed Oct 14 17:46:02 2015 +0300
     1.3 @@ -8,12 +8,13 @@
     1.4  void main()
     1.5  {
     1.6  	float pixw = 1.0 / texsize.x;
     1.7 +	vec2 maxuv = size / texsize;
     1.8  
     1.9  	vec3 texel = vec3(0.0, 0.0, 0.0);
    1.10  	for(int i=0; i<KSZ; i++) {
    1.11  		float x = float(i - HALF_KSZ) * pixw;
    1.12  		vec2 uv = gl_TexCoord[0].st + vec2(x, 0.0);
    1.13 -		texel += texture2D(tex, uv).rgb;
    1.14 +		texel += texture2D(tex, min(uv, maxuv)).rgb;
    1.15  	}
    1.16  
    1.17  	gl_FragColor.rgb = texel / SCALE;