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
162}162}
163 163
164void DeferredLightingEffect::render(const render::RenderContextPointer& renderContext) {164void DeferredLightingEffect::render(const render::RenderContextPointer& renderContext) {
165 auto args = renderContext->getArgs();165 auto args = renderContext->args;
166 gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {166 gpu::doInBatch(args->_context, [&](gpu::Batch& batch) {
167 167
168 // Allocate the parameters buffer used by all the deferred shaders168 // 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 batch.setViewportTransform(args->_viewport);188 batch.setViewportTransform(args->_viewport);
189 batch.setStateScissorRect(args->_viewport);189 batch.setStateScissorRect(args->_viewport);
190 190
191 // BInd the G-Buffer surfaces191 // Bind the G-Buffer surfaces
192 batch.setResourceTexture(DEFERRED_BUFFER_COLOR_UNIT, framebufferCache->getDeferredColorTexture());192 batch.setResourceTexture(DEFERRED_BUFFER_COLOR_UNIT, framebufferCache->getDeferredColorTexture());
193 batch.setResourceTexture(DEFERRED_BUFFER_NORMAL_UNIT, framebufferCache->getDeferredNormalTexture());193 batch.setResourceTexture(DEFERRED_BUFFER_NORMAL_UNIT, framebufferCache->getDeferredNormalTexture());
194 batch.setResourceTexture(DEFERRED_BUFFER_EMISSIVE_UNIT, framebufferCache->getDeferredSpecularTexture());194 batch.setResourceTexture(DEFERRED_BUFFER_EMISSIVE_UNIT, framebufferCache->getDeferredSpecularTexture());
195 batch.setResourceTexture(DEFERRED_BUFFER_DEPTH_UNIT, framebufferCache->getPrimaryDepthTexture());195 batch.setResourceTexture(DEFERRED_BUFFER_DEPTH_UNIT, framebufferCache->getPrimaryDepthTexture());
196 196
197 // need to assign the white texture if ao is off197 // need to assign the white texture if ao is off
198 if (renderContext->getOcclusionStatus()) {198 if (_ambientOcclusionEnabled) {
199 batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, framebufferCache->getOcclusionTexture());199 batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, framebufferCache->getOcclusionTexture());
200 } else {200 } else {
201 batch.setResourceTexture(DEFERRED_BUFFER_OBSCURANCE_UNIT, textureCache->getWhiteTexture());201 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