- Timestamp:
- 11/25/08 13:49:19 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3163 r3164 454 454 455 455 456 const float filterWidth = 100.0f;456 //const float filterWidth = 100.0f; 457 457 //const float filterWidth = 200.0f; 458 //const float filterWidth = 50.0f;458 const float filterWidth = 15.0f; 459 459 460 460 PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3163 r3164 97 97 uniform sampler2D colorsTex, 98 98 uniform float2 filterOffs[NUM_SSAO_FILTERSAMPLES], 99 uniform float filterWeights[NUM_SSAO_FILTERSAMPLES],100 99 float scale, 101 100 float3 bl, … … 137 136 //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-3f); 138 137 normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 139 convergenceFactor = min(100.0f, aoSample.y);140 //convergenceFactor = aoSample.y;138 //convergenceFactor = min(100.0f, aoSample.y); 139 convergenceFactor = aoSample.y; 141 140 142 141 // combine the weights … … 181 180 */ 182 181 183 const float eyeSpaceDepth = col.w;184 185 const float scaleFactor = 2.0f;186 const float distanceScale = scaleFactor / (eyeSpaceDepth + scaleFactor);187 188 const float convergence = ao.y;189 190 const float adaptFactor = 5.0f;191 const float convergenceScale = adaptFactor / (convergence + adaptFactor);192 193 194 182 if ((ao.y < 100.0f) && (col.w < 1e10f)) 195 183 //if (col.w < 1e10f) 196 184 { 197 ao.x = DiscontinuityFilter2(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, filterWeights, convergenceScale * distanceScale, bl, br, tl, tr); 185 const float eyeSpaceDepth = col.w; 186 const float distanceScaleWeight = 2.0f; 187 //const float distanceScale = distanceScaleWeight / (eyeSpaceDepth + distanceScaleWeight); 188 const float distanceScale = 1.0f; 189 190 const float convergence = ao.y; 191 const float adaptWeight = 5.0f; 192 const float convergenceScale = adaptWeight / (convergence + adaptWeight); 193 194 const float scale = convergenceScale * distanceScale; 195 196 197 ao.x = DiscontinuityFilter2(IN.texCoord, ao, col, ssaoTex, normalsTex, colorsTex, filterOffs, scale, bl, br, tl, tr); 198 198 } 199 199 200 //OUT.illum_col.xyz = col.xyz * ao.x;201 OUT.illum_col.xyz = float3(ao.x, ao.x, ao.x);200 OUT.illum_col.xyz = col.xyz * ao.x; 201 //OUT.illum_col.xyz = float3(ao.x, ao.x, ao.x); 202 202 //OUT.illum_col.xyz = float3(0, clamp(1.0f - ao.y * 1e-2f, 0, 1), 1); 203 203 OUT.illum_col.w = col.w; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3160 r3164 291 291 292 292 if ((((squaredLen <= DYNAMIC_OBJECTS_THRESHOLD) && (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD)) || 293 (depthDif <= 1e-2))293 (depthDif <= MIN_DEPTH_DIFF)) 294 294 && (oldTexCoords.x >= 0.0f) && (oldTexCoords.x < 1.0f) 295 295 && (oldTexCoords.y >= 0.0f) && (oldTexCoords.y < 1.0f)
Note: See TracChangeset
for help on using the changeset viewer.