- Timestamp:
- 08/29/08 17:27:05 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2884 r2885 78 78 float3 direction_to_sample = vector_to_sample / length_to_sample; 79 79 80 // Angle between current normal and direction to sample controls AO intensity.80 // angle between current normal and direction to sample controls AO intensity. 81 81 const float cos_angle = max(dot(direction_to_sample, currentNormal), 0.0f); 82 82 … … 85 85 (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample); 86 86 87 // if surface normal perpenticular to view dir, some samples probably count less88 // => compensate for this 87 // if surface normal perpenticular to view dir, approx. half of the samples will not count 88 // => compensate for this (on the other hand, projected sampling area could be larger!) 89 89 const float view_correction = 1.0f + VIEW_CORRECTION_SCALE * (1.0f - dot(currentViewDir, currentNormal)); 90 90
Note: See TracChangeset
for help on using the changeset viewer.