qvolray

diff sdr/demo.p.glsl @ 21:4c62be57fc1a

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 11 Apr 2012 16:59:45 +0300
parents 784d3d321caa
children 2d0dfb5751dc
line diff
     1.1 --- a/sdr/demo.p.glsl	Wed Apr 11 06:44:06 2012 +0300
     1.2 +++ b/sdr/demo.p.glsl	Wed Apr 11 16:59:45 2012 +0300
     1.3 @@ -1,10 +1,9 @@
     1.4  void main()
     1.5  {
     1.6 -	float val = 0.7;
     1.7 -	float len = length(gl_FragCoord.xyz);
     1.8 -	/*if(len < 0.5) {
     1.9 -		val = 0.7;
    1.10 -	}*/
    1.11 +	vec3 pos = gl_TexCoord[0].xyz * 2.0 - 1.0;
    1.12  
    1.13 -	gl_FragColor = vec4(gl_FragCoord.xyz / len, val);
    1.14 +	float len = length(pos);
    1.15 +	float val = 0.2 / (len * len);
    1.16 +
    1.17 +	gl_FragColor = vec4(-pos / len, val);
    1.18  }