Skip to content

Commit

Permalink
Added defaults for render target blending
Browse files Browse the repository at this point in the history
  • Loading branch information
adepke committed Apr 7, 2022
1 parent 8a8ec9d commit db09a68
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion VanguardEngine/Source/Rendering/RenderPipeline.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class RenderPipelineLayout
{
if (auto* value = std::get_if<GraphicsDesc>(&description); !value)
{
description = GraphicsDesc{
auto desc = GraphicsDesc{
.blendDescription = {
.AlphaToCoverageEnable = false,
.IndependentBlendEnable = false
Expand Down Expand Up @@ -69,6 +69,21 @@ class RenderPipelineLayout
}
}
};

desc.blendDescription.RenderTarget[0] = {
.BlendEnable = false,
.LogicOpEnable = false,
.SrcBlend = D3D12_BLEND_ONE,
.DestBlend = D3D12_BLEND_ZERO,
.BlendOp = D3D12_BLEND_OP_ADD,
.SrcBlendAlpha = D3D12_BLEND_ONE,
.DestBlendAlpha = D3D12_BLEND_ZERO,
.BlendOpAlpha = D3D12_BLEND_OP_ADD,
.LogicOp = D3D12_LOGIC_OP_NOOP,
.RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL
};

description = desc;
}
}

Expand Down

0 comments on commit db09a68

Please sign in to comment.