- Timestamp:
- 01/02/09 17:29:48 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/App/Demos/Vis/FriendlyCulling/src/DeferredRenderer.cpp
r3235 r3242 302 302 mSavedFrameNumber(-1), 303 303 mSavedFrameSuffix(""), 304 mMaxDistance(1e6f) 304 mMaxDistance(1e6f), 305 mTempCohFactor(.0f), 306 mUseToneMapping(false), 307 mUseAntiAliasing(false), 308 mUseDepthOfField(false) 305 309 { 306 310 /////////// … … 537 541 538 542 void DeferredRenderer::Render(FrameBufferObject *fbo, 539 float tempCohFactor,540 543 DirectionalLight *light, 541 bool useToneMapping,542 bool useAntiAliasing,543 544 ShadowMap *shadowMap 544 545 ) … … 562 563 { 563 564 case SSAO: 564 ComputeSsao(fbo, tempCohFactor);565 ComputeSsao(fbo, mTempCohFactor); 565 566 CombineSsao(fbo); 566 567 break; 567 568 case GI: 568 ComputeGlobIllum(fbo, tempCohFactor);569 ComputeGlobIllum(fbo, mTempCohFactor); 569 570 CombineIllum(fbo); 570 571 break; … … 574 575 } 575 576 576 /// do depth of field 577 DepthOfField(fbo); 578 579 if (useToneMapping) 577 /// depth of field 578 if (mUseDepthOfField) 579 { 580 DepthOfField(fbo); 581 } 582 583 if (mUseToneMapping) 580 584 { 581 585 float imageKey, whiteLum, middleGrey; … … 593 597 // multisampling is difficult / costly with deferred shading 594 598 // at least do some edge blurring 595 if ( useAntiAliasing) AntiAliasing(fbo, light, displayAfterAA);599 if (mUseAntiAliasing) AntiAliasing(fbo, light, displayAfterAA); 596 600 597 601 /// store the current frame … … 599 603 600 604 // if it hasn't been done yet => just output the latest buffer 601 if (! useAntiAliasing || !displayAfterAA)605 if (!mUseAntiAliasing || !displayAfterAA) 602 606 Output(fbo); 603 607 … … 1266 1270 ) 1267 1271 { 1268 // light source not visible1272 // light source visible? 1269 1273 if (!mSunVisiblePixels) return; 1270 1274 … … 1437 1441 1438 1442 1439 void DeferredRenderer::SetSortSamples(bool sortSamples)1443 /*void DeferredRenderer::SetSortSamples(bool sortSamples) 1440 1444 { 1441 1445 mSortSamples = sortSamples; 1442 } 1446 }*/ 1443 1447 1444 1448 … … 1452 1456 { 1453 1457 mMaxDistance = maxDist; 1458 } 1459 1460 1461 void DeferredRenderer::SetUseToneMapping(bool toneMapping) 1462 { 1463 mUseToneMapping = toneMapping; 1464 } 1465 1466 1467 void DeferredRenderer::SetUseAntiAliasing(bool antiAliasing) 1468 { 1469 mUseAntiAliasing = antiAliasing; 1470 } 1471 1472 1473 void DeferredRenderer::SetUseDepthOfField(bool dof) 1474 { 1475 mUseDepthOfField = dof; 1476 } 1477 1478 1479 void DeferredRenderer::SetTemporalCoherenceFactorForSsao(float factor) 1480 { 1481 mTempCohFactor = factor; 1454 1482 } 1455 1483
Note: See TracChangeset
for help on using the changeset viewer.