Changeset 2979 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 09/28/08 23:36:50 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r2978 r2979 52 52 float numSamples = 0; 53 53 54 // avoid singularity of55 centerPosition.xyz += currentNormal * 1e-4f;56 57 54 for (int i = 0; i < NUM_SAMPLES; ++ i) 58 55 { … … 85 82 const float cos_angle = max(dot(direction_to_sample, currentNormal), 0.0f); 86 83 84 // the distance_scale offset is used to avoid singularity that occurs at global illumination when 85 // the distance to a sample approaches zero 87 86 const float distance_intensity = 88 87 (SAMPLE_INTENSITY * DISTANCE_SCALE) / (DISTANCE_SCALE + length_to_sample * length_to_sample);
Note: See TracChangeset
for help on using the changeset viewer.