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/clsmap.gx

    r352 r420  
    3636    vec3 n, col; 
    3737    vec4 texel, lumi; 
    38     float intensity, shadow, NdotHV; 
     38    float intensity, shade, NdotHV; 
    3939 
    4040        lumi = texture2D(lmap, gl_TexCoord[0].st); 
    4141        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); 
    4445 
    4546    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); 
    4750 
    48         if( intensity > 0.0 ) 
     51        if( shade > 0.0 ) 
    4952        { 
    5053                NdotHV = max(dot(normalize(halfVector), n), 0.0);