Changeset 420 for branches/thune/thread_safe/gl/data/shader/clsbmap.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/clsbmap.gx
r395 r420 44 44 vec3 n, col; 45 45 vec4 texel, lumi; 46 float intensity, shad ow, NdotHV;46 float intensity, shade, NdotHV; 47 47 48 48 … … 53 53 n = normalize( T * n.x + B * n.y + normal * n.z ); 54 54 55 shadow = shadow2DProj(smap, gl_TexCoord[1]).r; 56 intensity = max( min(shadow, dot(lightDir, n)), lumi.r); 55 shade = shadow2DProj(smap, gl_TexCoord[1]).r; 56 shade = min(shade, dot(lightDir, n)); 57 intensity = max( shade, lumi.r); 57 58 58 59 texel = texture2D(cmap, gl_TexCoord[0].st); 59 col = texel.rgb * (intensity + gl_LightSource[0].ambient.rgb); 60 col = texel.rgb * 61 (max(intensity * gl_LightSource[0].diffuse.rgb, lumi.r) + 62 gl_LightSource[0].ambient.rgb); 60 63 61 if( intensity> 0.0 )64 if( shade > 0.0 ) 62 65 { 63 66 NdotHV = max(dot(normalize(halfVector), n), 0.0);
