Show
Ignore:
Timestamp:
06/30/07 08:14:01 (17 months ago)
Author:
krobillard
Message:

Thune GL - Added 'image & mouse button words. Fixes to specular model shaders.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/thune/thread_safe/gl/data/shader/clsbmap.gx

    r395 r420  
    4444    vec3 n, col; 
    4545    vec4 texel, lumi; 
    46     float intensity, shadow, NdotHV; 
     46    float intensity, shade, NdotHV; 
    4747 
    4848 
     
    5353    n = normalize( T * n.x + B * n.y + normal * n.z ); 
    5454 
    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); 
    5758 
    5859    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); 
    6063 
    61         if( intensity > 0.0 ) 
     64        if( shade > 0.0 ) 
    6265        { 
    6366                NdotHV = max(dot(normalize(halfVector), n), 0.0);