History

Merge with upstream

samcake committed 10 years ago

Commit 6926cd22 parents 8784f70 a49669a356 files · +7490 −3941Browse files

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

Unified · Split

libraries/render-utils/src/DebugDeferredBuffer.cpp+17−1
@@ -237,6 +237,14 @@ DebugDeferredBuffer::DebugDeferredBuffer() { · 236 unmodified lines
237 CustomPipeline pipeline;237 CustomPipeline pipeline;
238 pipeline.info = QFileInfo(QString::fromStdString(CUSTOM_FILE));238 pipeline.info = QFileInfo(QString::fromStdString(CUSTOM_FILE));
239 _customPipelines.emplace(CUSTOM_FILE, pipeline);239 _customPipelines.emplace(CUSTOM_FILE, pipeline);
240 _geometryId = DependencyManager::get<GeometryCache>()->allocateID();
241}
242
243DebugDeferredBuffer::~DebugDeferredBuffer() {
244 auto geometryCache = DependencyManager::get<GeometryCache>();
245 if (geometryCache) {
246 geometryCache->releaseID(_geometryId);
247 }
240}248}
241 249
242std::string DebugDeferredBuffer::getShaderSourceCode(Mode mode, std::string customFile) {250std::string DebugDeferredBuffer::getShaderSourceCode(Mode mode, std::string customFile) {
@@ -410,6 +418,14 @@ void DebugDeferredBuffer::run(const SceneContextPointer& sceneContext, const Ren · 167 unmodified lines
410 batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture());418 batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture());
411 }419 }
412 420
421 auto deferredLightingEffect = DependencyManager::get<DeferredLightingEffect>();
422 assert(deferredLightingEffect->getLightStage()->getNumLights() > 0);
423 auto lightAndShadow = deferredLightingEffect->getLightStage()->getLightAndShadow(0);
424 const auto& globalShadow = lightAndShadow.second;
425 if (globalShadow) {
426 batch.setResourceTexture(Shadow, globalShadow->map);
427 }
428
413 if (linearDepthTarget) {429 if (linearDepthTarget) {
414 batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture());430 batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture());
415 batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture());431 batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture());
@@ -426,7 +442,7 @@ void DebugDeferredBuffer::run(const SceneContextPointer& sceneContext, const Ren · 10 unmodified lines
426 const glm::vec4 color(1.0f, 1.0f, 1.0f, 1.0f);442 const glm::vec4 color(1.0f, 1.0f, 1.0f, 1.0f);
427 const glm::vec2 bottomLeft(_size.x, _size.y);443 const glm::vec2 bottomLeft(_size.x, _size.y);
428 const glm::vec2 topRight(_size.z, _size.w);444 const glm::vec2 topRight(_size.z, _size.w);
429 geometryBuffer->renderQuad(batch, bottomLeft, topRight, color);445 geometryBuffer->renderQuad(batch, bottomLeft, topRight, color, _geometryId);
430 446
431 447
432 batch.setResourceTexture(Albedo, nullptr);448 batch.setResourceTexture(Albedo, nullptr);

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