ld33_umonster
diff sdr/shadow-notex.p.glsl @ 2:35349df5392d
wtf?
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 22 Aug 2015 23:55:21 +0300 |
parents | 4a6683050e29 |
children | 93ff21458a16 |
line diff
1.1 --- a/sdr/shadow-notex.p.glsl Sat Aug 22 23:17:57 2015 +0300 1.2 +++ b/sdr/shadow-notex.p.glsl Sat Aug 22 23:55:21 2015 +0300 1.3 @@ -1,5 +1,5 @@ 1.4 /* vi: set ft=glsl */ 1.5 -uniform sampler2DShadow shadowmap; 1.6 +//uniform sampler2DShadow shadowmap; 1.7 1.8 varying vec3 vdir, ldir, normal; 1.9 varying vec4 shadow_tc; 1.10 @@ -10,10 +10,10 @@ 1.11 1.12 void main() 1.13 { 1.14 - float shadow = shadow2DProj(shadowmap, shadow_tc).x; 1.15 + float shadow = 1.0;//shadow2DProj(shadowmap, shadow_tc).x; 1.16 1.17 vec3 n = normalize(normal); 1.18 - vec3 v = normalize(vdir); 1.19 + /*vec3 v = normalize(vdir); 1.20 vec3 l = normalize(ldir); 1.21 vec3 h = normalize(l + v); 1.22 1.23 @@ -21,9 +21,12 @@ 1.24 float ndoth = max(dot(n, h), 0.0); 1.25 1.26 vec3 diffuse = KD * gl_LightSource[0].diffuse.rgb * ndotl; 1.27 - vec3 specular = KS * gl_LightSource[0].specular.rgb * pow(ndoth, SPOW); 1.28 + vec3 specular = vec3(0.0, 0.0, 0.0);//KS * gl_LightSource[0].specular.rgb * pow(ndoth, SPOW); 1.29 1.30 vec3 ambient = gl_LightModel.ambient.rgb * KD; 1.31 gl_FragColor.rgb = ambient + (diffuse + specular) * shadow; 1.32 gl_FragColor.a = gl_FrontMaterial.diffuse.a; 1.33 + */ 1.34 + gl_FragColor.rgb = n * 0.5 + 0.5; 1.35 + gl_FragColor.a = 1.0; 1.36 }