Ignore:
Timestamp:
10/29/08 18:21:41 (16 years ago)
Author:
mattausch
Message:
 
File:
1 edited

Legend:

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

    r3068 r3079  
    732732        glDrawBuffers(1, mrt + colorBufferIdx); 
    733733 
    734         float filterOffsets[NUM_DOWNSAMPLES * 2]; 
    735         float filterWeights[NUM_DOWNSAMPLES]; 
    736  
    737         PoissonDiscSampleGenerator2 poisson(NUM_DOWNSAMPLES, 1.0f); 
     734        float filterOffsets[NUM_SSAO_FILTERSAMPLES * 2]; 
     735        float filterWeights[NUM_SSAO_FILTERSAMPLES]; 
     736 
     737        PoissonDiscSampleGenerator2 poisson(NUM_SSAO_FILTERSAMPLES, 1.0f); 
    738738        poisson.Generate((float *)filterOffsets); 
    739739 
    740         const float xoffs = 2.0f / fbo->GetWidth(); 
    741         const float yoffs = 2.0f / fbo->GetHeight(); 
    742  
    743         for (int i = 0; i < NUM_DOWNSAMPLES; ++ i) 
     740        const float filterWidth = 10.0f; 
     741        const float xoffs = filterWidth / fbo->GetWidth(); 
     742        const float yoffs = filterWidth / fbo->GetHeight(); 
     743 
     744        for (int i = 0; i < NUM_SSAO_FILTERSAMPLES; ++ i) 
    744745        { 
    745746                float x = filterOffsets[2 * i + 0]; 
     
    756757        sCgCombineSsaoProgram->SetTexture(1, ssaoTex); 
    757758 
    758         sCgCombineSsaoProgram->SetArray2f(2, (float *)filterOffsets, NUM_DOWNSAMPLES); 
    759         sCgCombineSsaoProgram->SetArray1f(3, (float *)filterWeights, NUM_DOWNSAMPLES); 
     759        sCgCombineSsaoProgram->SetArray2f(2, (float *)filterOffsets, NUM_SSAO_FILTERSAMPLES); 
     760        sCgCombineSsaoProgram->SetArray1f(3, (float *)filterWeights, NUM_SSAO_FILTERSAMPLES); 
    760761         
    761762        DrawQuad(sCgCombineSsaoProgram); 
Note: See TracChangeset for help on using the changeset viewer.