- Timestamp:
- 04/27/09 18:58:18 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3362 r3363 13 13 //#define NUM_SAMPLES 16 14 14 //#define NUM_SAMPLES 24 15 #define NUM_SAMPLES 3216 //#define NUM_SAMPLES 4815 //#define NUM_SAMPLES 32 16 #define NUM_SAMPLES 48 17 17 18 #define MIN_SAMPLES 8 18 19 //#define MIN_SAMPLES 48 19 #define MIN_SAMPLES 820 20 21 21 #define DISTANCE_SCALE 1e-2f -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg
r3362 r3363 110 110 const float3 centerPos = ReconstructSamplePos(colorsTex, texCoord, bl, br, tl, tr); 111 111 112 #if 0112 #if 1 113 113 //const float scale = saturate((SSAO_CONVERGENCE_THRESHOLD - convergence + 100) / SSAO_CONVERGENCE_THRESHOLD); 114 114 const float scale = saturate((SSAO_CONVERGENCE_THRESHOLD - convergence) / SSAO_CONVERGENCE_THRESHOLD); 115 115 116 //for (int i = -SSAO_FILTER_RADIUS; i <= SSAO_FILTER_RADIUS; ++ i)116 for (int i = -SSAO_FILTER_RADIUS; i <= SSAO_FILTER_RADIUS; ++ i) 117 117 { 118 118 const float4 sampleTexCoord = float4(texCoord + i * xyStep * scale, .0f, .0f); … … 121 121 #else 122 122 123 const int radius = SSAO_FILTER_RADIUS * saturate((SSAO_CONVERGENCE_THRESHOLD - convergence + 100) / SSAO_CONVERGENCE_THRESHOLD);123 const float radius = SSAO_FILTER_RADIUS * saturate((SSAO_CONVERGENCE_THRESHOLD - convergence + 100) / SSAO_CONVERGENCE_THRESHOLD); 124 124 125 125 for (int i = -radius; i <= radius; ++ i) … … 205 205 206 206 // filter up to a certain convergance value and leave out background (sky) by checking depth 207 if ((!USE_OPTIMIZATION || convergence < SSAO_CONVERGENCE_THRESHOLD) && (depth < DEPTH_THRESHOLD)) 207 if ((!USE_OPTIMIZATION || convergence < SSAO_CONVERGENCE_THRESHOLD) && 208 (depth < DEPTH_THRESHOLD)) 208 209 { 209 210 // the filtered ssao value
Note: See TracChangeset
for help on using the changeset viewer.