History

Merge pull request #865 from ey6es/ssao

Basic screen space ambient occlusion effect. Defaults to off, because at the moment it slows things down substantially.

Stephen Birarda committed 13 years ago

Commit d0ab8312 parents 7ab0f18 dec4a4c14 files · +382 −17Browse files

Showing the changes to interface/src/Application.cpp (1 of 14 files). Show all

Unified · Split

interface/src/Application.cpp+6−0
@@ -1449,6 +1449,7 @@ void Application::init() { · 1448 unmodified lines
14491449 _environment.init();
14501450
14511451 _glowEffect.init();
1452+ _ambientOcclusionEffect.init();
14521453
14531454 _handControl.setScreenDimensions(_glWidget->width(), _glWidget->height());
14541455
@@ -2375,6 +2376,11 @@ void Application::displaySide(Camera& whichCamera) { · 920 unmodified lines
23752376 renderWorldBox();
23762377 }
23772378
2379+ // render the ambient occlusion effect if enabled
2380+ if (Menu::getInstance()->isOptionChecked(MenuOption::AmbientOcclusion)) {
2381+ _ambientOcclusionEffect.render();
2382+ }
2383+
23782384 // brad's frustum for debugging
23792385 if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayFrustum)) {
23802386 renderViewFrustum(_viewFrustum);