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 | 404 | batch.setPipeline(getPipeline(_mode, first)); |
| 405 | 405 | |
| 406 | − if (deferredFramebuffer) { | |
| 407 | − batch.setResourceTexture(Albedo, deferredFramebuffer->getDeferredColorTexture()); | |
| 408 | − batch.setResourceTexture(Normal, deferredFramebuffer->getDeferredNormalTexture()); | |
| 409 | − batch.setResourceTexture(Specular, deferredFramebuffer->getDeferredSpecularTexture()); | |
| 410 | − batch.setResourceTexture(Depth, deferredFramebuffer->getPrimaryDepthTexture()); | |
| 411 | − batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture()); | |
| 412 | − } | |
| 413 | − if (!lightStage.lights.empty()) { | |
| 414 | − batch.setResourceTexture(Shadow, lightStage.lights[0]->shadow.framebuffer->getDepthStencilBuffer()); | |
| 415 | − } | |
| 416 | − | |
| 417 | − if (linearDepthTarget) { | |
| 418 | − batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture()); | |
| 419 | − batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture()); | |
| 420 | − batch.setResourceTexture(HalfNormal, linearDepthTarget->getHalfNormalTexture()); | |
| 421 | − } | |
| 422 | − if (surfaceGeometryFramebuffer) { | |
| 423 | − batch.setResourceTexture(Curvature, surfaceGeometryFramebuffer->getCurvatureTexture()); | |
| 424 | − batch.setResourceTexture(DiffusedCurvature, surfaceGeometryFramebuffer->getLowCurvatureTexture()); | |
| 425 | − } | |
| 426 | − if (ambientOcclusionFramebuffer) { | |
| 427 | − batch.setResourceTexture(AmbientOcclusion, ambientOcclusionFramebuffer->getOcclusionTexture()); | |
| 428 | − batch.setResourceTexture(AmbientOcclusionBlurred, ambientOcclusionFramebuffer->getOcclusionBlurredTexture()); | |
| 429 | − } | |
| 406 | + if (deferredFramebuffer) { | |
| 407 | + batch.setResourceTexture(Albedo, deferredFramebuffer->getDeferredColorTexture()); | |
| 408 | + batch.setResourceTexture(Normal, deferredFramebuffer->getDeferredNormalTexture()); | |
| 409 | + batch.setResourceTexture(Specular, deferredFramebuffer->getDeferredSpecularTexture()); | |
| 410 | + batch.setResourceTexture(Depth, deferredFramebuffer->getPrimaryDepthTexture()); | |
| 411 | + batch.setResourceTexture(Lighting, deferredFramebuffer->getLightingTexture()); | |
| 412 | + } | |
| 413 | + | |
| 414 | + if (linearDepthTarget) { | |
| 415 | + batch.setResourceTexture(LinearDepth, linearDepthTarget->getLinearDepthTexture()); | |
| 416 | + batch.setResourceTexture(HalfLinearDepth, linearDepthTarget->getHalfLinearDepthTexture()); | |
| 417 | + batch.setResourceTexture(HalfNormal, linearDepthTarget->getHalfNormalTexture()); | |
| 418 | + } | |
| 419 | + if (surfaceGeometryFramebuffer) { | |
| 420 | + batch.setResourceTexture(Curvature, surfaceGeometryFramebuffer->getCurvatureTexture()); | |
| 421 | + batch.setResourceTexture(DiffusedCurvature, surfaceGeometryFramebuffer->getLowCurvatureTexture()); | |
| 422 | + } | |
| 423 | + if (ambientOcclusionFramebuffer) { | |
| 424 | + batch.setResourceTexture(AmbientOcclusion, ambientOcclusionFramebuffer->getOcclusionTexture()); | |
| 425 | + batch.setResourceTexture(AmbientOcclusionBlurred, ambientOcclusionFramebuffer->getOcclusionBlurredTexture()); | |
| 426 | + } | |
| 430 | 427 | const glm::vec4 color(1.0f, 1.0f, 1.0f, 1.0f); |
| 431 | 428 | const glm::vec2 bottomLeft(_size.x, _size.y); |
| 432 | 429 | const glm::vec2 topRight(_size.z, _size.w); |
| 433 | 430 | geometryBuffer->renderQuad(batch, bottomLeft, topRight, color); |
| 434 | 431 | |
| 435 | 432 | |
| 436 | − batch.setResourceTexture(Albedo, nullptr); | |
| 437 | − batch.setResourceTexture(Normal, nullptr); | |
| 438 | − batch.setResourceTexture(Specular, nullptr); | |
| 439 | − batch.setResourceTexture(Depth, nullptr); | |
| 440 | − batch.setResourceTexture(Lighting, nullptr); | |
| 441 | − batch.setResourceTexture(Shadow, nullptr); | |
| 442 | − batch.setResourceTexture(LinearDepth, nullptr); | |
| 443 | − batch.setResourceTexture(HalfLinearDepth, nullptr); | |
| 444 | − batch.setResourceTexture(HalfNormal, nullptr); | |
| 433 | + batch.setResourceTexture(Albedo, nullptr); | |
| 434 | + batch.setResourceTexture(Normal, nullptr); | |
| 435 | + batch.setResourceTexture(Specular, nullptr); | |
| 436 | + batch.setResourceTexture(Depth, nullptr); | |
| 437 | + batch.setResourceTexture(Lighting, nullptr); | |
| 438 | + batch.setResourceTexture(Shadow, nullptr); | |
| 439 | + batch.setResourceTexture(LinearDepth, nullptr); | |
| 440 | + batch.setResourceTexture(HalfLinearDepth, nullptr); | |
| 441 | + batch.setResourceTexture(HalfNormal, nullptr); | |
| 445 | 442 | |
| 446 | − batch.setResourceTexture(Curvature, nullptr); | |
| 447 | − batch.setResourceTexture(DiffusedCurvature, nullptr); | |
| 443 | + batch.setResourceTexture(Curvature, nullptr); | |
| 444 | + batch.setResourceTexture(DiffusedCurvature, nullptr); | |
| 448 | 445 | |
| 449 | − batch.setResourceTexture(AmbientOcclusion, nullptr); | |
| 450 | − batch.setResourceTexture(AmbientOcclusionBlurred, nullptr); | |
| 446 | + batch.setResourceTexture(AmbientOcclusion, nullptr); | |
| 447 | + batch.setResourceTexture(AmbientOcclusionBlurred, nullptr); | |
| 451 | 448 | |
| 452 | 449 | }); |
| 453 | 450 | } |