intravenous
diff sdr/vein.p.glsl @ 6:2723dc026c4f
collision detection
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 23 Apr 2012 21:43:10 +0300 |
parents | aab0d8ea21cd |
children |
line diff
1.1 --- a/sdr/vein.p.glsl Sun Apr 22 06:26:08 2012 +0300 1.2 +++ b/sdr/vein.p.glsl Mon Apr 23 21:43:10 2012 +0300 1.3 @@ -1,7 +1,7 @@ 1.4 uniform sampler2D tex_norm; 1.5 uniform vec3 fog_col; 1.6 1.7 -varying vec3 vpos, vnorm; 1.8 +varying vec3 vpos; 1.9 varying vec3 ldir, vdir; 1.10 1.11 const float fog_dens = 0.075; 1.12 @@ -13,7 +13,7 @@ 1.13 vec3 tnorm = texture2D(tex_norm, gl_TexCoord[0].st).xyz * 2.0 - 1.0; 1.14 vec3 n = normalize(tnorm); 1.15 vec3 v = normalize(vdir); 1.16 - vec3 l = v;//normalize(ldir); 1.17 + vec3 l = normalize(ldir); 1.18 vec3 h = normalize(l + v); 1.19 1.20 vec3 diff = vec3(0.8, 0.25, 0.2) * (1.0 - max(dot(l, n), 0.0));