- Timestamp:
- 10/29/08 18:21:41 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3068 r3079 732 732 glDrawBuffers(1, mrt + colorBufferIdx); 733 733 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); 738 738 poisson.Generate((float *)filterOffsets); 739 739 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) 744 745 { 745 746 float x = filterOffsets[2 * i + 0]; … … 756 757 sCgCombineSsaoProgram->SetTexture(1, ssaoTex); 757 758 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); 760 761 761 762 DrawQuad(sCgCombineSsaoProgram);
Note: See TracChangeset
for help on using the changeset viewer.