- Timestamp:
- 02/13/09 11:49:44 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3308 r3309 73 73 74 74 75 76 static Sample2 samples2[NUM_PRECOMPUTED_SAMPLES]; 75 77 // ssao random spherical samples 76 78 //static Sample2 samples2[NUM_SAMPLES]; 77 #define NUM_PRECOMPUTED_SAMPLES 2001 78 79 static Sample2 samples2[NUM_PRECOMPUTED_SAMPLES]; 79 80 80 // pcf samples 81 81 static Sample2 pcfSamples[NUM_PCF_TABS]; … … 743 743 sCgSsaoProgram->SetValue1f(i ++, (mUseTemporalCoherence && !mRegenerateSamples) ? tempCohFactor : 0); 744 744 745 static int currentPos = 0;746 747 745 if (/*mUseTemporalCoherence || */mRegenerateSamples) 748 746 { … … 752 750 // in the first case, the sample patterns look nicer, but the kernel 753 751 // needs longer to converge 754 //if (currentPos + NUM_SAMPLES >= NUM_PRECOMPUTED_SAMPLES) { 755 currentPos = 0; 756 GenerateSamples(mSamplingMethod); 757 //} 752 GenerateSamples(mSamplingMethod); 758 753 759 754 //if (mSortSamples) { SortSamples(); } 760 //sCgSsaoProgram->SetArray2f(i, (float *)samples2 + currentPos, NUM_SAMPLES); 761 sCgSsaoProgram->SetArray2f(i, (float *)samples2 + currentPos, NUM_PRECOMPUTED_SAMPLES); 762 763 currentPos += NUM_SAMPLES; 764 } 765 755 //sCgSsaoProgram->SetArray2f(i, (float *)samples2, NUM_SAMPLES); 756 sCgSsaoProgram->SetArray2f(i, (float *)samples2, NUM_PRECOMPUTED_SAMPLES); 757 } 758 759 766 760 ++ i; 767 761 768 762 for (int j = 0; j < 4; ++ j, ++ i) 763 { 769 764 sCgSsaoProgram->SetValue3f(i, mCornersView[j].x, mCornersView[j].y, mCornersView[j].z); 765 } 770 766 771 767 sCgSsaoProgram->SetMatrix(i ++, mProjViewMatrix);
Note: See TracChangeset
for help on using the changeset viewer.