- Timestamp:
- 04/29/09 18:10:02 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.