Ignore:
Timestamp:
04/17/09 17:37:38 (16 years ago)
Author:
mattausch
Message:
 
Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
5 edited

Legend:

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

    r3352 r3360  
    674674                FilterSsao(fbo); 
    675675                CombineSsao(fbo); 
     676 
    676677                break; 
    677678        case GI: 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3359 r3360  
    551551        camera = new PerspectiveCamera(winWidth / winHeight, fov); 
    552552        camera->SetNear(nearDist); 
    553         camera->SetFar(1000); 
     553        camera->SetFar(1e6f); 
    554554 
    555555        camera->SetDirection(camDir); 
     
    621621        //resourceManager->mUseNormalMapping = true; 
    622622        //resourceManager->mUseNormalMapping = false; 
    623  
    624623        resourceManager->mUseSpecialColors = true; 
    625624 
     
    632631 
    633632        if (0) LoadPompeiiFloor(); 
    634  
     633#if 1 
    635634 
    636635#if 0 
     
    647646        VertexArray positions; 
    648647         
     648        // for buddha (lowres) 
    649649        /*positions.push_back(Vector3(6.07307, 8.20723, 6.62)); 
    650650        positions.push_back(Vector3(-17.1935, 11.1687, 8.8781)); 
    651651        positions.push_back(Vector3(1.50032, 31.1943, 19.1f));*/ 
    652652 
    653         positions.push_back(Vector3(6.07307, 8.20723, 4.6f)); 
    654         positions.push_back(Vector3(-17.1935, 11.1687, 6.8f)); 
    655         positions.push_back(Vector3(1.50032, 31.1943, 17.6f)); 
     653        // for happy buddha 
     654        //positions.push_back(Vector3(6.07307, 8.20723, 4.6f)); 
     655        //positions.push_back(Vector3(-17.1935, 11.1687, 6.8f)); 
     656        //positions.push_back(Vector3(1.50032, 31.1943, 17.6f)); 
     657 
     658        // for dragon 
     659        //positions.push_back(Vector3(6.07307, 8.20723, 5.0f)); 
     660        positions.push_back(Vector3(0, 0, -0.8)); 
    656661 
    657662#endif 
     
    661666         
    662667        //LoadModel("hbuddha.dem", dynamicObjects); 
    663         //LoadModel("horse.dem", dynamicObjects); 
    664         LoadModel("happy.dem", dynamicObjects); 
     668        LoadModel("horse.dem", dynamicObjects); 
     669        //LoadModel("happy.dem", dynamicObjects); 
     670        //LoadModel("dragon.dem", dynamicObjects); 
    665671        //LoadModel("torus.dem", dynamicObjects); 
    666672        //LoadModel("venusm.dem", dynamicObjects); 
     
    680686 
    681687        // hack: second buddha 
    682         dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 
    683         dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 
    684688        dynamicObjects[0]->GetTransform()->MultMatrix(rotMatrix); 
    685689        dynamicObjects[0]->GetTransform()->MultMatrix(scaleMatrix); 
    686         dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 
    687         dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 
     690 
     691        //dynamicObjects[1]->GetTransform()->MultMatrix(rotMatrix); 
     692        //dynamicObjects[1]->GetTransform()->MultMatrix(scaleMatrix); 
     693 
     694        //dynamicObjects[2]->GetTransform()->MultMatrix(rotMatrix); 
     695        //dynamicObjects[2]->GetTransform()->MultMatrix(scaleMatrix); 
    688696 
    689697        cout << "dynamic objects: " << (int)dynamicObjects.size() << endl; 
     698 
     699        CreateAnimation(positions[0]); 
     700#endif 
    690701 
    691702        // hack 
     
    722733 
    723734        // set far plane based on scene extent 
    724         farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal()); 
     735        //farDist = 10.0f * Magnitude(bvh->GetBox().Diagonal()); 
     736        farDist = 1000.0f; 
    725737        camera->SetFar(farDist); 
    726738 
     
    739751        /// the turbitity of the sky (from clear to hazy, use <3 for clear sky) 
    740752        preetham = new SkyPreetham(turbitity, skyDome); 
    741  
    742         CreateAnimation(positions[0]); 
    743753 
    744754 
     
    16061616                break; 
    16071617        case '9': 
    1608                 ssaoKernelRadius *= 0.8f; 
     1618                ssaoKernelRadius *= .8f; 
    16091619                cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 
    16101620                if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 
    16111621                break; 
    16121622        case '0': 
    1613                 ssaoKernelRadius *= 1.0f / 0.8f; 
     1623                ssaoKernelRadius *= 1.0f / .8f; 
    16141624                if (deferredShader) deferredShader->SetKernelRadius(ssaoKernelRadius); 
    16151625                cout << "new ssao kernel radius: " << ssaoKernelRadius << endl; 
    16161626                break; 
    16171627        case 'n': 
    1618                 ssaoSampleIntensity *= 0.9f; 
     1628                ssaoSampleIntensity *= .9f; 
    16191629                if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 
    16201630                cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; 
    16211631                break; 
    16221632        case 'N': 
    1623                 ssaoSampleIntensity *= 1.0f / 0.9f; 
     1633                ssaoSampleIntensity *= 1.0f / .9f; 
    16241634                if (deferredShader) deferredShader->SetSampleIntensity(ssaoSampleIntensity); 
    16251635                cout << "new ssao sample intensity: " << ssaoSampleIntensity << endl; 
     
    16711681        case 'T': 
    16721682                useTemporalCoherence = !useTemporalCoherence; 
     1683                cout << "using temporal coherence " << useTemporalCoherence << endl; 
    16731684                break; 
    16741685        case 'a': 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaderenv.h

    r3356 r3360  
    66//-- ssao + gi parameters 
    77 
    8 #define NUM_PRECOMPUTED_SAMPLES 8124 
     8//#define NUM_PRECOMPUTED_SAMPLES 8124 
     9#define NUM_PRECOMPUTED_SAMPLES 4096 
     10//#define NUM_PRECOMPUTED_SAMPLES 2048 
    911 
    1012//#define NUM_SAMPLES 8 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/deferred.cg

    r3353 r3360  
    4040 
    4141        // hack: prevent to shade the sky 
    42 #if 0 
     42#if 1 
    4343        if (color.w > DEPTH_THRESHOLD) 
    4444        { 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/shaders/mrt.cg

    r3168 r3360  
    102102        //pix.id = glstate.fog.color.xyz; 
    103103        // the offset to the world pos from old frame 
     104        //pix.offsVec = float3(0,0,0); 
    104105        pix.offsVec = IN.oldWorldPos.xyz - IN.worldPos.xyz; 
    105106 
     
    124125        // the offset to the world pos from old frame 
    125126        pix.offsVec = IN.oldWorldPos.xyz - IN.worldPos.xyz; 
     127        //pix.offsVec = float3(0,0,0); 
    126128 
    127129        return pix; 
Note: See TracChangeset for help on using the changeset viewer.