- Timestamp:
- 04/14/09 11:59:23 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3351 r3352 25 25 uniform float3 normal, 26 26 float3 lightDir, 27 float4 ao) 27 float4 ao, 28 float useAO) 28 29 { 29 30 // diffuse intensity … … 45 46 else 46 47 { 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; 49 52 } 50 53 … … 60 63 uniform sampler2D normals, 61 64 uniform float3 lightDir, 62 uniform sampler2D aoTex 65 uniform sampler2D aoTex, 66 uniform float useAO 63 67 ) 64 68 { … … 70 74 71 75 float3 normal = normalize(norm.xyz); 72 float4 col = shade(IN, color, normal, lightDir, ao );76 float4 col = shade(IN, color, normal, lightDir, ao, useAO); 73 77 74 78 OUT.color = col;
Note: See TracChangeset
for help on using the changeset viewer.