Changeset 2826 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 07/09/08 20:12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r2825 r2826 1 #define NUM_SAMPLES 122 #define SAMPLE_INTENSITY 1.2f1 #define NUM_SAMPLES 8 2 #define SAMPLE_INTENSITY 0.5f 3 3 //#define SAMPLE_INTENSITY 0.7f 4 4 #define AREA_SIZE 5e-1f … … 88 88 float total_ao = 0.0; 89 89 90 //const float areaSize = 5e-1f;90 const float areaSize = 5e-1f; 91 91 //const float areaSize = 3e-1f; 92 92 //const float sampleIntensity = 0.2f; … … 118 118 119 119 // distance between current position and sample position controls AO intensity. 120 //const float maxdist = 4e-1f;121 const float maxdist = 5e-1f;122 123 float distance_intensity = maxdist - length_to_sample;124 //float distance_intensity = 0.5f / (1.0f+ length_to_sample * length_to_sample);125 distance_intensity = max(distance_intensity, 0.0f);120 //const float maxdist = 2e-1f; 121 //const float maxdist = 5e-1f; 122 const float distanceScale = 1e-6f; 123 //float distance_intensity = maxdist - length_to_sample; 124 float distance_intensity = (SAMPLE_INTENSITY * distanceScale) / (distanceScale + length_to_sample * length_to_sample); 125 //distance_intensity = max(distance_intensity, 0.0f); 126 126 // quadratic influence 127 distance_intensity *= distance_intensity;128 129 total_ao += cos_angle * SAMPLE_INTENSITY *distance_intensity;127 //distance_intensity *= distance_intensity; 128 129 total_ao += cos_angle * distance_intensity; 130 130 } 131 131
Note: See TracChangeset
for help on using the changeset viewer.