Graphics/Camera: Add clear color per viewer
This commit is contained in:
@@ -62,7 +62,7 @@ namespace Nz
|
||||
builder.TextureBarrier(textureTransition.srcStageMask, textureTransition.dstStageMask, textureTransition.srcAccessMask, textureTransition.dstAccessMask, textureTransition.oldLayout, textureTransition.newLayout, *texture);
|
||||
}
|
||||
|
||||
builder.BeginRenderPass(*passData.framebuffer, *passData.renderPass, passData.renderRect);
|
||||
builder.BeginRenderPass(*passData.framebuffer, *passData.renderPass, passData.renderRect, passData.outputClearValues.data(), passData.outputClearValues.size());
|
||||
|
||||
if (!passData.name.empty())
|
||||
builder.BeginDebugRegion(passData.name, Color::Green);
|
||||
|
||||
@@ -8,6 +8,11 @@
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
const Color& Camera::GetClearColor() const
|
||||
{
|
||||
return m_clearColor;
|
||||
}
|
||||
|
||||
UInt32 Camera::GetRenderMask() const
|
||||
{
|
||||
return m_renderMask;
|
||||
|
||||
@@ -475,7 +475,7 @@ namespace Nz
|
||||
forwardPass.SetDepthStencilInput(viewerData.depthStencilAttachment);
|
||||
//forwardPass.SetDepthStencilOutput(viewerData.depthStencilAttachment);
|
||||
|
||||
forwardPass.SetClearColor(0, Color::Black);
|
||||
forwardPass.SetClearColor(0, viewer->GetClearColor());
|
||||
forwardPass.SetDepthStencilClear(1.f, 0);
|
||||
|
||||
forwardPass.SetExecutionCallback([&]()
|
||||
|
||||
Reference in New Issue
Block a user