Showing the changes to libraries/render-utils/src/DebugDeferredBuffer.cpp (1 of 9 files). Show all
Unified · Split
| @@ -403,51 +403,48 @@ void DebugDeferredBuffer::run(const SceneContextPointer& sceneContext, const Ren · 402 unmodified lines | |||
| 403 | 403 | ||
| 404 | batch.setPipeline(getPipeline(_mode, first)); | 404 | batch.setPipeline(getPipeline(_mode, first)); |
| 405 | 405 | ||
| 406 | if (deferredFramebuffer) { | 406 | if (deferredFramebuffer) { |
| 407 | batch.setResourceTexture(Albedo, deferredFramebuffer->getDeferredColorTexture()); | 407 | batch.setResourceTexture(Albedo, deferredFramebuffer->getDeferredColorTexture()); |
| 408 | batch.setResourceTexture(Normal, deferredFramebuffer->getDeferredNormalTexture()); | 408 | batch.setResourceTexture(Normal, deferredFramebuffer->getDeferredNormalTexture()); |
| 409 | batch.setResourceTexture(Specular, deferredFramebuffer->getDeferredSpecularTexture()); | 409 | batch.setResourceTexture(Specular, deferredFramebuffer->getDeferredSpecularTexture()); |
| 410 | batch.setResourceTexture(Depth, deferredFramebuffer->getPrimaryDepthTexture()); | 410 | batch.setResourceTexture(Depth, deferredFramebuffer->getPrimaryDepthTexture()); |
| 411 | batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture()); | 411 | batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture()); |
| 412 | } | 412 | } |
| 413 | if (!lightStage.lights.empty()) { | 413 | |
| 414 | batch.setResourceTexture(Shadow, lightStage.lights[0]->shadow.framebuffer->getDepthStencilBuffer()); | 414 | if (linearDepthTarget) { |
| 415 | } | 415 | batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture()); |
| 416 | 416 | batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture()); | |
| 417 | if (linearDepthTarget) { | 417 | batch.setResourceTexture(HalfNormal, linearDepthTarget->getHalfNormalTexture()); |
| 418 | batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture()); | 418 | } |
| 419 | batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture()); | 419 | if (surfaceGeometryFramebuffer) { |
| 420 | batch.setResourceTexture(HalfNormal, linearDepthTarget->getHalfNormalTexture()); | 420 | batch.setResourceTexture(Curvature, surfaceGeometryFramebuffer->getCurvatureTexture()); |
| 421 | } | 421 | batch.setResourceTexture(DiffusedCurvature, surfaceGeometryFramebuffer->getLowCurvatureTexture()); |
| 422 | if (surfaceGeometryFramebuffer) { | 422 | } |
| 423 | batch.setResourceTexture(Curvature, surfaceGeometryFramebuffer->getCurvatureTexture()); | 423 | if (ambientOcclusionFramebuffer) { |
| 424 | batch.setResourceTexture(DiffusedCurvature, surfaceGeometryFramebuffer->getLowCurvatureTexture()); | 424 | batch.setResourceTexture(AmbientOcclusion, ambientOcclusionFramebuffer->getOcclusionTexture()); |
| 425 | } | 425 | batch.setResourceTexture(AmbientOcclusionBlurred, ambientOcclusionFramebuffer->getOcclusionBlurredTexture()); |
| 426 | if (ambientOcclusionFramebuffer) { | 426 | } |
| 427 | batch.setResourceTexture(AmbientOcclusion, ambientOcclusionFramebuffer->getOcclusionTexture()); | ||
| 428 | batch.setResourceTexture(AmbientOcclusionBlurred, ambientOcclusionFramebuffer->getOcclusionBlurredTexture()); | ||
| 429 | } | ||
| 430 | const glm::vec4 color(1.0f, 1.0f, 1.0f, 1.0f); | 427 | const glm::vec4 color(1.0f, 1.0f, 1.0f, 1.0f); |
| 431 | const glm::vec2 bottomLeft(_size.x, _size.y); | 428 | const glm::vec2 bottomLeft(_size.x, _size.y); |
| 432 | const glm::vec2 topRight(_size.z, _size.w); | 429 | const glm::vec2 topRight(_size.z, _size.w); |
| 433 | geometryBuffer->renderQuad(batch, bottomLeft, topRight, color); | 430 | geometryBuffer->renderQuad(batch, bottomLeft, topRight, color); |
| 434 | 431 | ||
| 435 | 432 | ||
| 436 | batch.setResourceTexture(Albedo, nullptr); | 433 | batch.setResourceTexture(Albedo, nullptr); |
| 437 | batch.setResourceTexture(Normal, nullptr); | 434 | batch.setResourceTexture(Normal, nullptr); |
| 438 | batch.setResourceTexture(Specular, nullptr); | 435 | batch.setResourceTexture(Specular, nullptr); |
| 439 | batch.setResourceTexture(Depth, nullptr); | 436 | batch.setResourceTexture(Depth, nullptr); |
| 440 | batch.setResourceTexture(Lighting, nullptr); | 437 | batch.setResourceTexture(Lighting, nullptr); |
| 441 | batch.setResourceTexture(Shadow, nullptr); | 438 | batch.setResourceTexture(Shadow, nullptr); |
| 442 | batch.setResourceTexture(LinearDepth, nullptr); | 439 | batch.setResourceTexture(LinearDepth, nullptr); |
| 443 | batch.setResourceTexture(HalfLinearDepth, nullptr); | 440 | batch.setResourceTexture(HalfLinearDepth, nullptr); |
| 444 | batch.setResourceTexture(HalfNormal, nullptr); | 441 | batch.setResourceTexture(HalfNormal, nullptr); |
| 445 | 442 | ||
| 446 | batch.setResourceTexture(Curvature, nullptr); | 443 | batch.setResourceTexture(Curvature, nullptr); |
| 447 | batch.setResourceTexture(DiffusedCurvature, nullptr); | 444 | batch.setResourceTexture(DiffusedCurvature, nullptr); |
| 448 | 445 | ||
| 449 | batch.setResourceTexture(AmbientOcclusion, nullptr); | 446 | batch.setResourceTexture(AmbientOcclusion, nullptr); |
| 450 | batch.setResourceTexture(AmbientOcclusionBlurred, nullptr); | 447 | batch.setResourceTexture(AmbientOcclusionBlurred, nullptr); |
| 451 | 448 | ||
| 452 | }); | 449 | }); |
| 453 | } | 450 | } |