oculus1

diff sdr/sdr.glsl @ 23:0c76f70fb7e9

merged
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 28 Sep 2013 04:13:33 +0300
parents f3672317e5c2
children
line diff
     1.1 --- a/sdr/sdr.glsl	Sat Sep 28 04:13:09 2013 +0300
     1.2 +++ b/sdr/sdr.glsl	Sat Sep 28 04:13:33 2013 +0300
     1.3 @@ -2,6 +2,7 @@
     1.4  uniform float aspect, scale;
     1.5  uniform float lens_center_offset;
     1.6  uniform vec4 dist_factors;
     1.7 +uniform vec2 tex_scale;
     1.8  
     1.9  vec2 distort_texcoords(in vec2 tc);
    1.10  float barrel_scale(float x, in vec4 k);
    1.11 @@ -10,9 +11,9 @@
    1.12  {
    1.13  	vec2 tc = distort_texcoords(gl_TexCoord[0].xy);
    1.14  
    1.15 -	float vis = any(greaterThan(tc, vec2(1.0)) || lessThan(tc, vec2(0.0))) ? 0.0 : 1.0;
    1.16 +	float vis = any(greaterThan(tc, vec2(1.0))) || any(lessThan(tc, vec2(0.0))) ? 0.0 : 1.0;
    1.17  
    1.18 -	gl_FragColor.rgb = texture2D(tex, tc).rgb * vis;
    1.19 +	gl_FragColor.rgb = texture2D(tex, tc * tex_scale).rgb * vis;
    1.20  	gl_FragColor.a = 1.0;
    1.21  }
    1.22