Ignore:
Timestamp:
02/13/09 11:49:44 (15 years ago)
Author:
mattausch
Message:

working on changed sampling scheme for temporal coherence

File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp

    r3308 r3309  
    7373 
    7474 
     75 
     76static Sample2 samples2[NUM_PRECOMPUTED_SAMPLES]; 
    7577// ssao random spherical samples 
    7678//static Sample2 samples2[NUM_SAMPLES]; 
    77 #define NUM_PRECOMPUTED_SAMPLES 2001 
    78  
    79 static Sample2 samples2[NUM_PRECOMPUTED_SAMPLES]; 
     79 
    8080// pcf samples 
    8181static Sample2 pcfSamples[NUM_PCF_TABS]; 
     
    743743        sCgSsaoProgram->SetValue1f(i ++, (mUseTemporalCoherence && !mRegenerateSamples) ? tempCohFactor : 0); 
    744744         
    745         static int currentPos = 0; 
    746  
    747745        if (/*mUseTemporalCoherence || */mRegenerateSamples) 
    748746        { 
     
    752750                // in the first case, the sample patterns look nicer, but the kernel 
    753751                // needs longer to converge 
    754                 //if (currentPos + NUM_SAMPLES >= NUM_PRECOMPUTED_SAMPLES)      { 
    755                         currentPos = 0; 
    756                         GenerateSamples(mSamplingMethod); 
    757                 //} 
     752                GenerateSamples(mSamplingMethod); 
    758753 
    759754                //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 
    766760        ++ i; 
    767761 
    768762        for (int j = 0; j < 4; ++ j, ++ i) 
     763        { 
    769764                sCgSsaoProgram->SetValue3f(i, mCornersView[j].x, mCornersView[j].y, mCornersView[j].z); 
     765        } 
    770766 
    771767        sCgSsaoProgram->SetMatrix(i ++, mProjViewMatrix); 
Note: See TracChangeset for help on using the changeset viewer.