Ignore:
Timestamp:
09/24/08 11:08:13 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r2967 r2968  
    3737                         float3 lightDir) 
    3838{ 
    39         /* 
    40         float4 lightDir2 = float4(-0.5f, 0.5f, 0.4f, 0.0f); 
    41         float3 light2 = normalize(lightDir2.xyz); 
    42         float diffuseLight2 = saturate(dot(normal, light2)); 
    43         */ 
    4439        // diffuse intensity 
    4540        const float angle = saturate(dot(normal, lightDir));  
     
    5146        const float4 ambient = glstate.light[0].ambient; 
    5247         
    53         return (emmisive < 0.95) ? (ambient + diffuse) * color : color; 
     48        float4 outColor; 
    5449 
    55         //return (saturate(((ambient + diffuse))) * (1.0f - emmisive) + emmisive) * color; 
     50        if (emmisive > 1.5) outColor = color; 
     51        //else if (emmisive > 0.95)     outColor = color * lightDiffuse; 
     52        else 
     53                outColor = (ambient + diffuse) * color; 
     54 
     55        return outColor; 
    5656        //return saturate((((ambient + diffuse)) * (1.0f - emmisive) + emmisive) * color); 
    5757} 
     
    8282         
    8383        OUT.color = col; 
     84        //OUT.color = float4(100.0, 1, 1, 0); 
    8485        OUT.color.w = color.w; 
    8586 
     
    123124        } 
    124125 
    125         total_d /= (float)NUM_SAMPLES; 
     126        total_d /= (float)NUM_PCF_TABS; 
    126127 
    127128        return total_d; 
     
    182183         
    183184        // base lighting 
    184         OUT.color = (emmisive < 0.95) ? (ambient + diffuse) * color : color; 
     185        OUT.color = (emmisive > 1.5f) ? color: (ambient + diffuse) * color; 
    185186 
    186187        // also write out depth component 
Note: See TracChangeset for help on using the changeset viewer.