Basic screen space ambient occlusion effect. Defaults to off, because at the moment it slows things down substantially.
Showing the changes to interface/src/Application.cpp (1 of 14 files). Show all
Unified · Split
| @@ -1449,6 +1449,7 @@ void Application::init() { · 1448 unmodified lines | ||
| 1449 | 1449 | _environment.init(); |
| 1450 | 1450 | |
| 1451 | 1451 | _glowEffect.init(); |
| 1452 | + _ambientOcclusionEffect.init(); | |
| 1452 | 1453 | |
| 1453 | 1454 | _handControl.setScreenDimensions(_glWidget->width(), _glWidget->height()); |
| 1454 | 1455 | |
| @@ -2375,6 +2376,11 @@ void Application::displaySide(Camera& whichCamera) { · 920 unmodified lines | ||
| 2375 | 2376 | renderWorldBox(); |
| 2376 | 2377 | } |
| 2377 | 2378 | |
| 2379 | + // render the ambient occlusion effect if enabled | |
| 2380 | + if (Menu::getInstance()->isOptionChecked(MenuOption::AmbientOcclusion)) { | |
| 2381 | + _ambientOcclusionEffect.render(); | |
| 2382 | + } | |
| 2383 | + | |
| 2378 | 2384 | // brad's frustum for debugging |
| 2379 | 2385 | if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayFrustum)) { |
| 2380 | 2386 | renderViewFrustum(_viewFrustum); |