Changeset 3371 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 05/19/09 12:02:26 (15 years ago)
- Location:
- GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3370 r3371 845 845 846 846 //if (mRegenerateSamples) 847 if (1)//mUseTemporalCoherence || mRegenerateSamples) 847 if (//mUseTemporalCoherence || 848 mRegenerateSamples) 848 849 { 849 850 mRegenerateSamples = false; … … 860 861 else 861 862 { 862 //UpdateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES);863 UpdateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES); 863 864 } 864 865 … … 867 868 //if (mSortSamples) { SortSamples(); } 868 869 sCgSsaoProgram->SetArray2f(i, (float *)samples2 + dummy, NUM_SAMPLES); 869 870 cout << "d " << dummy << " ";871 870 872 871 dummy = (dummy + NUM_SAMPLES) % NUM_PRECOMPUTED_SAMPLES; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp
r3364 r3371 356 356 str.read(reinterpret_cast<char *>(vertices), sizeof(Vector3) * vertexCount); 357 357 358 //cout << "vertexCount: " << vertexCount << endl; 359 358 360 normals = new Vector3[vertexCount]; 359 361 str.read(reinterpret_cast<char *>(normals), sizeof(Vector3) * vertexCount); 360 362 363 361 364 Vector3 *tangents; 362 365 … … 374 377 str.read(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); 375 378 379 //cout << "texCoordCount: " << texCoordCount << endl; 376 380 377 381 if (texCoordCount) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp
r3370 r3371 181 181 for (int i = 0; i < mNumSamples; ++ i) 182 182 { 183 x[0] = RandomValue(0, 1); x[1] = RandomValue(0, 1);184 //mHalton->GetNext(x);183 //x[0] = RandomValue(0, 1); x[1] = RandomValue(0, 1); 184 mHalton->GetNext(x); 185 185 186 186 const float a = 2.0f * M_PI * x[0]; -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3369 r3371 669 669 #if 1 670 670 671 //LoadModel("hbuddha.dem", dynamicObjects);671 LoadModel("hbuddha.dem", dynamicObjects); 672 672 //LoadModel("horse.dem", dynamicObjects); 673 LoadModel("happy2.dem", dynamicObjects);673 //LoadModel("happy2.dem", dynamicObjects); 674 674 //LoadModel("torus.dem", dynamicObjects); 675 675 //LoadModel("venusm.dem", dynamicObjects); … … 835 835 // another color buffer 836 836 fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, ColorBufferObject::FILTER_NEAREST); 837 837 838 838 839 for (int i = 0; i < 4; ++ i) -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h
r3370 r3371 8 8 //#define NUM_PRECOMPUTED_SAMPLES 8124 9 9 #define NUM_PRECOMPUTED_SAMPLES 4096 10 #define NUM_PRECOMPUTED_SAMPLES 6410 //#define NUM_PRECOMPUTED_SAMPLES 1024 11 11 12 12 //#define NUM_SAMPLES 16 13 //#define NUM_SAMPLES 24 13 #define NUM_SAMPLES 16 14 14 //#define NUM_SAMPLES 32 15 #define NUM_SAMPLES 6415 //#define NUM_SAMPLES 64 16 16 17 #define MIN_SAMPLES 6417 #define MIN_SAMPLES 16 18 18 //#define MIN_SAMPLES 48 19 19 … … 66 66 #define NUM_DOF_TABS 16 67 67 68 #define USE_GTX68 //#define USE_GTX 69 69 70 70 #define SSAO_FILTER_RADIUS 5 -
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.