- Timestamp:
- 08/31/08 13:15:30 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2886 r2887 88 88 // if surface normal perpenticular to view dir, approx. half of the samples will not count 89 89 // => compensate for this (on the other hand, projected sampling area could be larger!) 90 const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 90 //const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 91 //total_ao += cos_angle * distance_intensity * view_correction; 91 92 92 total_ao += cos_angle * distance_intensity * view_correction;93 total_ao += cos_angle * distance_intensity; 93 94 } 94 95 95 return max(0.0f, 1.0f - total_ao); 96 //return max(0.0f, 1.0f - total_ao); 97 return saturate(dot(currentViewDir, currentNormal)); 96 98 } 97 99 … … 178 180 float4 ao = tex2D(ssaoTex, IN.texCoord.xy); 179 181 180 OUT.illum_col = col * ao.x; 181 //OUT.illum_col = ao; 182 //OUT.illum_col = col * ao.x; 183 OUT.illum_col = ao; 184 182 185 OUT.illum_col.w = ao.w; 183 186
Note: See TracChangeset
for help on using the changeset viewer.