Skip to content

Commit

Permalink
PBR Renderer: don't set wireframe fill mode when using line topology
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Oct 11, 2023
1 parent 5febc00 commit 0d77637
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions PBR/src/PBR_Renderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,11 +934,13 @@ void PBR_Renderer::CreateWireframePSO(const WireframePSOKey& Key)
PipelineStateDesc& PSODesc = PSOCreateInfo.PSODesc;
GraphicsPipelineDesc& GraphicsPipeline = PSOCreateInfo.GraphicsPipeline;

GraphicsPipeline.NumRenderTargets = 1;
GraphicsPipeline.RTVFormats[0] = m_Settings.RTVFmt;
GraphicsPipeline.DSVFormat = m_Settings.DSVFmt;
GraphicsPipeline.PrimitiveTopology = Key.Topology;
GraphicsPipeline.RasterizerDesc.FillMode = FILL_MODE_WIREFRAME;
GraphicsPipeline.NumRenderTargets = 1;
GraphicsPipeline.RTVFormats[0] = m_Settings.RTVFmt;
GraphicsPipeline.DSVFormat = m_Settings.DSVFmt;
GraphicsPipeline.PrimitiveTopology = Key.Topology;
if (Key.Topology != PRIMITIVE_TOPOLOGY_LINE_LIST && Key.Topology != PRIMITIVE_TOPOLOGY_LINE_STRIP &&
Key.Topology != PRIMITIVE_TOPOLOGY_LINE_LIST_ADJ && Key.Topology != PRIMITIVE_TOPOLOGY_LINE_STRIP_ADJ)
GraphicsPipeline.RasterizerDesc.FillMode = FILL_MODE_WIREFRAME;
GraphicsPipeline.RasterizerDesc.FrontCounterClockwise = (Key.Flags & PSO_FLAG_FRONT_CCW) != 0;

InputLayoutDescX InputLayout;
Expand Down

0 comments on commit 0d77637

Please sign in to comment.