Ignore:
Timestamp:
05/19/09 12:02:26 (15 years ago)
Author:
mattausch
Message:

fehler tritt nicht auf!!

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  
    845845 
    846846        //if (mRegenerateSamples) 
    847         if (1)//mUseTemporalCoherence || mRegenerateSamples) 
     847        if (//mUseTemporalCoherence ||  
     848                mRegenerateSamples) 
    848849        { 
    849850                mRegenerateSamples = false; 
     
    860861                else 
    861862                { 
    862                         //UpdateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES); 
     863                        UpdateSampleTex(samples2, NUM_PRECOMPUTED_SAMPLES); 
    863864                } 
    864865 
     
    867868                //if (mSortSamples) { SortSamples(); } 
    868869                sCgSsaoProgram->SetArray2f(i, (float *)samples2 + dummy, NUM_SAMPLES); 
    869  
    870                 cout << "d " << dummy << " "; 
    871870 
    872871                dummy = (dummy + NUM_SAMPLES) % NUM_PRECOMPUTED_SAMPLES; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/ResourceManager.cpp

    r3364 r3371  
    356356    str.read(reinterpret_cast<char *>(vertices), sizeof(Vector3) * vertexCount); 
    357357         
     358        //cout << "vertexCount: " << vertexCount << endl; 
     359 
    358360        normals = new Vector3[vertexCount]; 
    359361        str.read(reinterpret_cast<char *>(normals), sizeof(Vector3) * vertexCount); 
    360362 
     363 
    361364        Vector3 *tangents; 
    362365 
     
    374377        str.read(reinterpret_cast<char *>(&texCoordCount), sizeof(int)); 
    375378 
     379        //cout << "texCoordCount: " << texCoordCount << endl; 
    376380 
    377381        if (texCoordCount) 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SampleGenerator.cpp

    r3370 r3371  
    181181        for (int i = 0; i < mNumSamples; ++ i) 
    182182        { 
    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); 
    185185                 
    186186                const float a = 2.0f * M_PI * x[0]; 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3369 r3371  
    669669#if 1 
    670670 
    671         //LoadModel("hbuddha.dem", dynamicObjects); 
     671        LoadModel("hbuddha.dem", dynamicObjects); 
    672672        //LoadModel("horse.dem", dynamicObjects); 
    673         LoadModel("happy2.dem", dynamicObjects); 
     673        //LoadModel("happy2.dem", dynamicObjects); 
    674674        //LoadModel("torus.dem", dynamicObjects); 
    675675        //LoadModel("venusm.dem", dynamicObjects); 
     
    835835        // another color buffer 
    836836        fbo->AddColorBuffer(ColorBufferObject::RGBA_FLOAT_32, ColorBufferObject::WRAP_CLAMP_TO_EDGE, ColorBufferObject::FILTER_LINEAR, ColorBufferObject::FILTER_NEAREST); 
     837 
    837838 
    838839        for (int i = 0; i < 4; ++ i) 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3370 r3371  
    88//#define NUM_PRECOMPUTED_SAMPLES 8124 
    99#define NUM_PRECOMPUTED_SAMPLES 4096 
    10 #define NUM_PRECOMPUTED_SAMPLES 64 
     10//#define NUM_PRECOMPUTED_SAMPLES 1024 
    1111 
    1212//#define NUM_SAMPLES 16 
    13 //#define NUM_SAMPLES 24 
     13#define NUM_SAMPLES 16 
    1414//#define NUM_SAMPLES 32 
    15 #define NUM_SAMPLES 64 
     15//#define NUM_SAMPLES 64 
    1616 
    17 #define MIN_SAMPLES 64 
     17#define MIN_SAMPLES 16 
    1818//#define MIN_SAMPLES 48 
    1919 
     
    6666#define NUM_DOF_TABS 16 
    6767 
    68 #define USE_GTX 
     68//#define USE_GTX 
    6969 
    7070#define SSAO_FILTER_RADIUS 5 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/ssao.cg

    r3370 r3371  
    487487                float2 offset; 
    488488 
    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]; 
    491491 
    492492                //////////////////// 
     
    494494                //-- (affects performance for some reason!) 
    495495 
    496                 if (0)//!USE_OPTIMIZATION || 
     496                if (1)//!USE_OPTIMIZATION || 
    497497                        //(convergence < SSAO_CONVERGENCE_THRESHOLD)) 
    498498                { 
     
    685685        float3 ao; 
    686686        //$$temp matt 
    687         oldIdx = dummyIdx; 
     687        //oldIdx = dummyIdx; 
    688688 
    689689        // cull background note: this should be done with the stencil buffer 
     
    758758        //-- blend ao between old and new samples (and avoid division by zero) 
    759759 
    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); 
    762762 
    763763        OUT.illum_col.y = combinedWeight; 
Note: See TracChangeset for help on using the changeset viewer.