Changeset 420 for branches/thune/thread_safe/gl/data/shader/clsmap.gx
- Timestamp:
- 06/30/07 08:14:01 (17 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
branches/thune/thread_safe/gl/data/shader/clsmap.gx
r352 r420 36 36 vec3 n, col; 37 37 vec4 texel, lumi; 38 float intensity, shad ow, NdotHV;38 float intensity, shade, NdotHV; 39 39 40 40 lumi = texture2D(lmap, gl_TexCoord[0].st); 41 41 n = normalize(normal); 42 shadow = shadow2DProj(smap, gl_TexCoord[1]).r; 43 intensity = max( min(shadow, dot(lightDir, n)), lumi.r); 42 shade = shadow2DProj(smap, gl_TexCoord[1]).r; 43 shade = min(shade, dot(lightDir, n)); 44 intensity = max( shade, lumi.r); 44 45 45 46 texel = texture2D(cmap, gl_TexCoord[0].st); 46 col = texel.rgb * (intensity + gl_LightSource[0].ambient.rgb); 47 col = texel.rgb * 48 (max(intensity * gl_LightSource[0].diffuse.rgb, lumi.r) + 49 gl_LightSource[0].ambient.rgb); 47 50 48 if( intensity> 0.0 )51 if( shade > 0.0 ) 49 52 { 50 53 NdotHV = max(dot(normalize(halfVector), n), 0.0);
