- Timestamp:
- 05/19/09 12:02:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg
r3370 r3371 487 487 float2 offset; 488 488 489 //const float2 ssaoOffset = tex2Dlod(samples, float4((0.5f + i + oldIdx) / NUM_PRECOMPUTED_SAMPLES, .5f, .0f, .0f)).xy;490 const float2 ssaoOffset = dummySamples[i];489 const float2 ssaoOffset = tex2Dlod(samples, float4((0.5f + i + oldIdx) / NUM_PRECOMPUTED_SAMPLES, .5f, .0f, .0f)).xy; 490 //const float2 ssaoOffset = dummySamples[i]; 491 491 492 492 //////////////////// … … 494 494 //-- (affects performance for some reason!) 495 495 496 if ( 0)//!USE_OPTIMIZATION ||496 if (1)//!USE_OPTIMIZATION || 497 497 //(convergence < SSAO_CONVERGENCE_THRESHOLD)) 498 498 { … … 685 685 float3 ao; 686 686 //$$temp matt 687 oldIdx = dummyIdx;687 //oldIdx = dummyIdx; 688 688 689 689 // cull background note: this should be done with the stencil buffer … … 758 758 //-- blend ao between old and new samples (and avoid division by zero) 759 759 760 OUT.illum_col.x = ao.x ;//* newWeight + oldSsao * oldWeight;761 //OUT.illum_col.x /= (newWeight + oldWeight);760 OUT.illum_col.x = ao.x * newWeight + oldSsao * oldWeight; 761 OUT.illum_col.x /= (newWeight + oldWeight); 762 762 763 763 OUT.illum_col.y = combinedWeight;
Note: See TracChangeset
for help on using the changeset viewer.