Changeset 3287 for GTP/trunk/App/Demos/Vis/FriendlyCulling/src
- Timestamp:
- 01/19/09 20:49:54 (15 years ago)
- 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 1358 1358 1359 1359 static char imageName[200]; 1360 sprintf(imageName, "%s_%05d. bmp", mSavedFrameSuffix.c_str(), mSavedFrameNumber);1360 sprintf(imageName, "%s_%05d.tga", mSavedFrameSuffix.c_str(), mSavedFrameNumber); 1361 1361 1362 1362 ILstring fileName = ILstring(imageName); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/Pvs.h
r3285 r3287 11 11 class Bvh; 12 12 13 #define USE_TIMESTAMPS13 //#define USE_TIMESTAMPS 14 14 15 15 struct PvsEntry -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/SkyPreetham.cpp
r3279 r3287 296 296 ambient *= 1e-1f; 297 297 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 298 303 // simulate the sun intensity by modulating the ambient term. 299 304 ambient *= (10.0f - 9.0f * DotProd(sunDir, Vector3::UNIT_Z())); -
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/chcdemo.cpp
r3286 r3287 386 386 void LoadPompeiiFloor(); 387 387 388 void LoadOrUpdatePVSs(const Vector3 &pos); 389 390 391 388 392 float pvsTotalSamples = .0f; 389 393 float pvsTotalTime = .0f; … … 1214 1218 SetupEyeView(); 1215 1219 1220 1216 1221 // set frame related parameters for GPU programs 1217 1222 GPUProgramParameters::InitFrame(camera, light); … … 1242 1247 glEnableClientState(GL_VERTEX_ARRAY); 1243 1248 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 1255 1251 1256 1252 // render with the specified method (forward rendering, forward + depth, deferred) … … 1335 1331 //if (traverser->GetType() == RenderTraverser::CULL_COLLECTOR) 1336 1332 // ((PvsCollectionRenderer *)traverser)->SetViewCell(usePvs ? viewCell : NULL); 1333 1334 //renderState.LockCullFaceEnabled(true); 1337 1335 1338 1336 // actually render the scene geometry using the specified algorithm … … 1805 1803 1806 1804 // hack: load pvs on replay (remove later!) 1807 usePvs = true;1805 //usePvs = true; 1808 1806 } 1809 1807 else … … 2534 2532 renderState.SetUseAlphaToCoverage(false); 2535 2533 2534 const Vector3 lightPos = light->GetDirection() * -1e3f; 2535 if (usePvs) LoadOrUpdatePVSs(lightPos); 2536 2537 2536 2538 // change CHC++ set of renderState variables 2537 2539 // this must be done for each change of camera because … … 2671 2673 2672 2674 2673 void LoadPvs()2675 void UpdatePvs(const Vector3 &pos) 2674 2676 { 2675 2677 viewCell = viewCellsTree->GetViewCell(camera->GetPosition()); … … 2798 2800 staticObjects.push_back(myplane); 2799 2801 } 2802 2803 2804 void 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.