Skip to content

Commit

Permalink
Fix the blend state
Browse files Browse the repository at this point in the history
  • Loading branch information
cursey committed Jan 30, 2022
1 parent 26f6a7e commit 0edfaf9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/D3D12Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,16 @@ D3D12Renderer::D3D12Renderer(IDXGISwapChain* swapchain_, ID3D12Device* device_,

auto& blend = pso_desc.BlendState;
blend.AlphaToCoverageEnable = false;
blend.IndependentBlendEnable = false;
blend.RenderTarget[0].BlendEnable = true;
blend.RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_ALPHA;
blend.RenderTarget[0].LogicOpEnable = false;
blend.RenderTarget[0].SrcBlend = D3D12_BLEND_ONE;
blend.RenderTarget[0].DestBlend = D3D12_BLEND_INV_SRC_ALPHA;
blend.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
blend.RenderTarget[0].SrcBlendAlpha = D3D12_BLEND_ONE;
blend.RenderTarget[0].DestBlendAlpha = D3D12_BLEND_INV_SRC_ALPHA;
blend.RenderTarget[0].BlendOpAlpha = D3D12_BLEND_OP_ADD;
blend.RenderTarget[0].LogicOp = D3D12_LOGIC_OP_NOOP;
blend.RenderTarget[0].RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;

auto& raster = pso_desc.RasterizerState;
Expand Down

0 comments on commit 0edfaf9

Please sign in to comment.