Reset blend color to (0,0,0,0) at the start of render subpass

This commit is contained in:
Austin Eng
2017-08-04 11:11:26 -04:00
committed by Austin Eng
parent cce6b01b6d
commit 12a00ba3d1
3 changed files with 140 additions and 1 deletions

View File

@@ -278,6 +278,9 @@ namespace d3d12 {
} else {
commandList->OMSetRenderTargets(args.numRTVs, args.RTVs, FALSE, nullptr);
}
static constexpr std::array<float, 4> defaultBlendFactor = { 0, 0, 0, 0 };
commandList->OMSetBlendFactor(&defaultBlendFactor[0]);
}
break;
@@ -398,7 +401,6 @@ namespace d3d12 {
case Command::DrawArrays:
{
DrawArraysCmd* draw = commands.NextCommand<DrawArraysCmd>();
commandList->DrawInstanced(
draw->vertexCount,
draw->instanceCount,

View File

@@ -148,6 +148,8 @@ namespace opengl {
glClearDepth(1.0);
glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
}
glBlendColor(0, 0, 0, 0);
}
break;