Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 19 files). Show all
Unified · Split
| @@ -162,7 +162,7 @@ void DeferredLightingEffect::prepare(RenderArgs* args) { · 161 unmodified lines | ||
| 162 | 162 | } |
| 163 | 163 | |
| 164 | 164 | void DeferredLightingEffect::render(const render::RenderContextPointer& renderContext) { |
| 165 | − auto args = renderContext->getArgs(); | |
| 165 | + auto args = renderContext->args; | |
| 166 | 166 | gpu::doInBatch(args->_context, [&](gpu::Batch& batch) { |
| 167 | 167 | |
| 168 | 168 | // Allocate the parameters buffer used by all the deferred shaders |
| @@ -188,14 +188,14 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo · 19 unmodified lines | ||
| 188 | 188 | batch.setViewportTransform(args->_viewport); |
| 189 | 189 | batch.setStateScissorRect(args->_viewport); |
| 190 | 190 | |
| 191 | − // BInd the G-Buffer surfaces | |
| 191 | + // Bind the G-Buffer surfaces | |
| 192 | 192 | batch.setResourceTexture(DEFERRED_BUFFER_COLOR_UNIT, framebufferCache->getDeferredColorTexture()); |
| 193 | 193 | batch.setResourceTexture(DEFERRED_BUFFER_NORMAL_UNIT, framebufferCache->getDeferredNormalTexture()); |
| 194 | 194 | batch.setResourceTexture(DEFERRED_BUFFER_EMISSIVE_UNIT, framebufferCache->getDeferredSpecularTexture()); |
| 195 | 195 | batch.setResourceTexture(DEFERRED_BUFFER_DEPTH_UNIT, framebufferCache->getPrimaryDepthTexture()); |
| 196 | 196 | |
| 197 | 197 | // need to assign the white texture if ao is off |
| 198 | − if (renderContext->getOcclusionStatus()) { | |
| 198 | + if (_ambientOcclusionEnabled) { | |
| 199 | 199 | batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, framebufferCache->getOcclusionTexture()); |
| 200 | 200 | } else { |
| 201 | 201 | batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, textureCache->getWhiteTexture()); |