Changeset 3365 for GTP/trunk/App/Demos/Vis
- Timestamp:
- 04/29/09 18:10:02 (16 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3362 r3365 828 828 //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_NEAREST); 829 829 // buffer holding the difference vector to the old frame 830 fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_ 16, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR);830 fbo->AddColorBuffer(ColorBufferObject::RGB_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 831 831 //fbo->AddColorBuffer(ColorBufferObject::RGB_UBYTE, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR); 832 832 // another color buffer … … 1208 1208 1209 1209 //const float rotAngle = M_PI * 1e-3f; 1210 //const float rotAngle = 0.3f * M_PI / 180.0f;1211 const float rotAngle = 0.6f * M_PI / 180.0f;1210 const float rotAngle = 1.5f * M_PI / 180.0f; 1211 //const float rotAngle = 0.6f * M_PI / 180.0f; 1212 1212 1213 1213 Matrix4x4 rotMatrix = RotationZMatrix(rotAngle); … … 1221 1221 1222 1222 //const float moveSpeed = 5e-3f; 1223 const float moveSpeed = 1e-1f;1223 const float moveSpeed = 5e-1f; 1224 1224 motionPath->Move(moveSpeed); 1225 1225 } -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/combineSsaoSep.cg
r3364 r3365 275 275 //OUT.illum_col.xyz = float3(ao.w * 5e-1f, 0, 0); 276 276 //OUT.illum_col.xyz = float3(ao.z * 1e-3f); 277 //OUT.illum_col.xyz = float3(ao.y * 1e-3f); 278 OUT.illum_col.xyz = float3(ao.y); 277 278 //OUT.illum_col.xyz = float3(ao.y * 5e-4f); 279 //OUT.illum_col.xyz = float3(ao.y); 279 280 //OUT.illum_col.xyz = ao.xyz; 280 281 -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg
r3364 r3365 312 312 (oldEyeSpaceDepth < DEPTH_THRESHOLD) && (projectedEyeSpaceDepth < DEPTH_THRESHOLD) && 313 313 //(oldDynamic || newDynamic) && // check if we have a dynamic object 314 (depthDif > 5e- 3f)))//MIN_DEPTH_DIFF)))314 (depthDif > 5e-2f)))//MIN_DEPTH_DIFF))) 315 315 ) // and there is a depth discontinuity 316 316 { … … 322 322 } 323 323 324 isPixelValid = depthDif;324 //isPixelValid = depthDif; 325 325 326 326 return float2(isPixelValid, abs(oldEyeSpaceDepth - projectedEyeSpaceDepth)); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3364 r3365 547 547 // they possibly have any influence on the ao 548 548 549 if ( 1)//cosAngle >0)550 { 551 float pixelValid = sampleColor.x;549 if (cosAngle >= 0) 550 { 551 float pixelValid = 0;//sampleColor.x; 552 552 553 553 if (1)//pixelValid < 0.5f) … … 555 555 const float3 sampleDiffVec = tex2Dlod(attribsTex, float4(texcoord, .0f, .0f)).xyz; 556 556 //pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 100.0f); 557 //pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 4.0f);557 pixelValid = max(pixelValid, length(sampleDiffVec - diffVec) < 5e-3f ? .0f : 4.0f); 558 558 //pixelValid = length(sampleDiffVec - diffVec) < 1e-3f ? .0f : 10.0f; 559 559 } … … 686 686 #else 687 687 688 const float3 diffVec = float3(.0f);688 const float3 diffVec = float3(.0f); 689 689 const bool isMovingObject = false; 690 const float oldSsao = .0f;690 const float oldSsao = .0f; 691 691 692 692 float oldWeight = .0f; … … 754 754 const float factor = 4.0f; 755 755 //if (oldIdx >= factor * newWeight) oldIdx = 0; 756 oldWeight = min(oldWeight, factor * newWeight);757 //oldWeight = oldIdx = .0f;756 //oldWeight = min(oldWeight, factor * newWeight); 757 oldWeight = oldIdx = .0f; 758 758 } 759 759 } … … 771 771 const float combinedWeight = clamp(newWeight + oldWeight, .0f, temporalCoherence); 772 772 773 OUT.illum_col.y = ao.y;//combinedWeight;773 OUT.illum_col.y = combinedWeight; 774 774 OUT.illum_col.z = oldIdx + newWeight; // the new index 775 775 OUT.illum_col.w = eyeSpaceDepth;
Note: See TracChangeset
for help on using the changeset viewer.