History

Gut RenderContext

Zach Pomerantz committed 10 years ago

Commit f3265db1 parent e8b8f4d19 files · +117 −142Browse files

Showing the changes to libraries/render-utils/src/DeferredLightingEffect.cpp (1 of 19 files). Show all

Unified · Split

libraries/render-utils/src/DeferredLightingEffect.cpp+3−3
@@ -162,7 +162,7 @@ void DeferredLightingEffect::prepare(RenderArgs* args) { · 161 unmodified lines
162162 }
163163
164164 void DeferredLightingEffect::render(const render::RenderContextPointer& renderContext) {
165− auto args = renderContext->getArgs();
165+ auto args = renderContext->args;
166166 gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
167167
168168 // Allocate the parameters buffer used by all the deferred shaders
@@ -188,14 +188,14 @@ void DeferredLightingEffect::render(const render::RenderContextPointer& renderCo · 19 unmodified lines
188188 batch.setViewportTransform(args->_viewport);
189189 batch.setStateScissorRect(args->_viewport);
190190
191− // BInd the G-Buffer surfaces
191+ // Bind the G-Buffer surfaces
192192 batch.setResourceTexture(DEFERRED_BUFFER_COLOR_UNIT, framebufferCache->getDeferredColorTexture());
193193 batch.setResourceTexture(DEFERRED_BUFFER_NORMAL_UNIT, framebufferCache->getDeferredNormalTexture());
194194 batch.setResourceTexture(DEFERRED_BUFFER_EMISSIVE_UNIT, framebufferCache->getDeferredSpecularTexture());
195195 batch.setResourceTexture(DEFERRED_BUFFER_DEPTH_UNIT, framebufferCache->getPrimaryDepthTexture());
196196
197197 // need to assign the white texture if ao is off
198− if (renderContext->getOcclusionStatus()) {
198+ if (_ambientOcclusionEnabled) {
199199 batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, framebufferCache->getOcclusionTexture());
200200 } else {
201201 batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, textureCache->getWhiteTexture());

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t