Ignore:
Timestamp:
01/19/09 20:49:54 (15 years ago)
Author:
mattausch
Message:

worked on videos - still problems with strange white pixels

Location:
GTP/trunk/App/Demos/Vis/FriendlyCulling/src
Files:
4 edited

Legend:

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

    r3270 r3287  
    13581358 
    13591359        static char imageName[200]; 
    1360         sprintf(imageName, "%s_%05d.bmp", mSavedFrameSuffix.c_str(), mSavedFrameNumber); 
     1360        sprintf(imageName, "%s_%05d.tga", mSavedFrameSuffix.c_str(), mSavedFrameNumber); 
    13611361 
    13621362        ILstring fileName = ILstring(imageName); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Pvs.h

    r3285 r3287  
    1111class Bvh; 
    1212 
    13 #define USE_TIMESTAMPS 
     13//#define USE_TIMESTAMPS 
    1414 
    1515struct PvsEntry 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp

    r3279 r3287  
    296296                ambient *= 1e-1f; 
    297297 
     298        //  could be too blueish ... 
     299        ambient.x *= 1.3f; 
     300        ambient.y *= 1.2f; 
     301        ambient.z = max(max(ambient.z, ambient.x), ambient.y); 
     302 
    298303        // simulate the sun intensity by modulating the ambient term. 
    299304        ambient *= (10.0f - 9.0f * DotProd(sunDir, Vector3::UNIT_Z())); 
  • GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp

    r3286 r3287  
    386386void LoadPompeiiFloor(); 
    387387 
     388void LoadOrUpdatePVSs(const Vector3 &pos); 
     389 
     390 
     391 
    388392float pvsTotalSamples = .0f; 
    389393float pvsTotalTime = .0f; 
     
    12141218        SetupEyeView(); 
    12151219         
     1220 
    12161221        // set frame related parameters for GPU programs 
    12171222        GPUProgramParameters::InitFrame(camera, light); 
     
    12421247        glEnableClientState(GL_VERTEX_ARRAY); 
    12431248 
    1244         if (usePvs) 
    1245         { 
    1246                 if (!viewCellsTree)      
    1247                 { 
    1248                         LoadVisibilitySolution(); 
    1249                         applicationTimer.Start(); 
    1250                         shotRays = visibilitySolutionInitialState; 
    1251                 } 
    1252  
    1253                 if (viewCellsTree) LoadPvs(); 
    1254         } 
     1249        if (usePvs) LoadOrUpdatePVSs(camera->GetPosition()); 
     1250 
    12551251 
    12561252        // render with the specified method (forward rendering, forward + depth, deferred) 
     
    13351331                //if (traverser->GetType() == RenderTraverser::CULL_COLLECTOR) 
    13361332                //      ((PvsCollectionRenderer *)traverser)->SetViewCell(usePvs ? viewCell : NULL); 
     1333 
     1334                //renderState.LockCullFaceEnabled(true); 
    13371335 
    13381336                // actually render the scene geometry using the specified algorithm 
     
    18051803 
    18061804                        // hack: load pvs on replay (remove later!) 
    1807                         usePvs = true; 
     1805                        //usePvs = true; 
    18081806                } 
    18091807                else 
     
    25342532        renderState.SetUseAlphaToCoverage(false); 
    25352533 
     2534        const Vector3 lightPos = light->GetDirection() * -1e3f; 
     2535        if (usePvs) LoadOrUpdatePVSs(lightPos); 
     2536 
     2537 
    25362538        // change CHC++ set of renderState variables  
    25372539        // this must be done for each change of camera because 
     
    26712673 
    26722674 
    2673 void LoadPvs() 
     2675void UpdatePvs(const Vector3 &pos) 
    26742676{ 
    26752677        viewCell = viewCellsTree->GetViewCell(camera->GetPosition()); 
     
    27982800        staticObjects.push_back(myplane); 
    27992801} 
     2802 
     2803 
     2804void LoadOrUpdatePVSs(const Vector3 &pos) 
     2805{ 
     2806        if (!viewCellsTree)      
     2807        { 
     2808                LoadVisibilitySolution(); 
     2809                applicationTimer.Start(); 
     2810                shotRays = visibilitySolutionInitialState; 
     2811        } 
     2812 
     2813        if (viewCellsTree) UpdatePvs(pos); 
     2814} 
Note: See TracChangeset for help on using the changeset viewer.