Changeset 3189 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Timestamp:
- 11/27/08 02:14:31 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/antialiasing.cg
r3175 r3189 76 76 77 77 //const float de = saturate(dot(dd, weights.y)); 78 const float de = weights.y * dd.x + dd.y + dd.z +dd.w;78 const float de = weights.y * dd.x * dd.y * dd.z * dd.w; 79 79 80 80 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsao.cg
r3168 r3189 130 130 spatialFactor = 1.0f / max(len, 1e-3f); 131 131 132 //normalFactor = max(step(0.6f, dot(sampleNorm, centerNormal)), 1e-3f);133 normalFactor = max(dot(sampleNorm, samplePos), 1e-3f);132 normalFactor = max(step(.0f, dot(sampleNorm, centerNormal)), 1e-3f); 133 //normalFactor = max(dot(sampleNorm, samplePos), 1e-3f); 134 134 //convergenceFactor = min(100.0f, aoSample.y); 135 135 convergenceFactor = aoSample.y; … … 137 137 // combine the weights 138 138 w = convergenceFactor * spatialFactor * normalFactor; 139 //w = convergenceFactor * spatialFactor; 139 140 140 141 average += aoSample.x * w; … … 169 170 float4 ao = tex2Dlod(ssaoTex, float4(IN.texCoord, 0, 0)); 170 171 171 // reconstruct position from the eye space depth172 /*const float4 worldPos = float4(-IN.view * eyeSpaceDepth, 1.0f);173 // compute w factor from projection in order to control filter size174 const float4 projPos = mul(modelViewProj, worldPos);175 const float distanceScale = 1.0f / projPos.w;176 */177 178 172 // filter up to a certain convergance value and leave out background (sky) by checking depth 179 173 if ((ao.y < 100.0f) && (col.w < 1e10f)) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3168 r3189 290 290 float validPixel; 291 291 292 if ((((squaredLen <= DYNAMIC_OBJECTS_THRESHOLD) && (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD)) || 293 (depthDif <= MIN_DEPTH_DIFF)) 292 const bool oldDynamic = (squaredLen <= DYNAMIC_OBJECTS_THRESHOLD); 293 const bool newDynamic = (oldPixel.z <= DYNAMIC_OBJECTS_THRESHOLD); 294 295 if (!(oldDynamic && !newDynamic) && !(!oldDynamic && newDynamic) && 296 !(oldDynamic && newDynamic && (depthDif > MIN_DEPTH_DIFF)) 294 297 && (oldTexCoords.x >= 0.0f) && (oldTexCoords.x < 1.0f) 295 298 && (oldTexCoords.y >= 0.0f) && (oldTexCoords.y < 1.0f)
Note: See TracChangeset
for help on using the changeset viewer.