Ignore:
Timestamp:
04/14/09 11:59:23 (15 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3351 r3352  
    2525                         uniform float3 normal, 
    2626                         float3 lightDir, 
    27                          float4 ao) 
     27                         float4 ao, 
     28                         float useAO) 
    2829{ 
    2930        // diffuse intensity 
     
    4546        else  
    4647        { 
    47                 outColor = (ambient * ao + diffuse) * color; 
    48                 //outColor = ambient + diffuse * color; 
     48                if (useAO > 0.5f) 
     49                        outColor = (ambient * ao + diffuse) * color; 
     50                else 
     51                        outColor = (ambient + diffuse) * color; 
    4952        } 
    5053 
     
    6063                   uniform sampler2D normals, 
    6164                   uniform float3 lightDir, 
    62                    uniform sampler2D aoTex 
     65                   uniform sampler2D aoTex, 
     66                   uniform float useAO 
    6367                   ) 
    6468{ 
     
    7074         
    7175        float3 normal = normalize(norm.xyz); 
    72         float4 col = shade(IN, color, normal, lightDir, ao); 
     76        float4 col = shade(IN, color, normal, lightDir, ao, useAO); 
    7377         
    7478        OUT.color = col; 
Note: See TracChangeset for help on using the changeset viewer.