File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Samples/Desktop/D3D12Raytracing/src/D3D12RaytracingSakuraForestSER Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -1554,15 +1554,22 @@ void D3D12RaytracingSakuraForestSER::OnUpdate()
15541554 const XMVECTOR& prevLightPosition = m_sceneCB[prevFrameIndex].lightPosition ;
15551555 m_sceneCB[frameIndex].lightPosition = XMVector3Transform (prevLightPosition, rotate);
15561556 }
1557- m_sceneCB[frameIndex].enableSER = m_serEnabled ? 1 : 0 ;
1558- if (m_sortByHit)
1557+ if (!m_serEnabled)
1558+ {
1559+ m_sceneCB[frameIndex].sortMode = SORTMODE_OFF;
1560+ }
1561+ else if (m_sortByHit)
1562+ {
15591563 m_sceneCB[frameIndex].sortMode = SORTMODE_BY_HIT;
1564+ }
15601565 else if (m_sortByMaterial)
1566+ {
15611567 m_sceneCB[frameIndex].sortMode = SORTMODE_BY_MATERIAL;
1568+ }
15621569 else if (m_sortByBoth)
1570+ {
15631571 m_sceneCB[frameIndex].sortMode = SORTMODE_BY_BOTH;
1564- else
1565- m_sceneCB[frameIndex].sortMode = SORTMODE_OFF;
1572+ }
15661573}
15671574
15681575void D3D12RaytracingSakuraForestSER::DoRaytracing ()
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ struct SceneConstantBuffer
3737 XMVECTOR lightPosition;
3838 XMVECTOR lightAmbientColor;
3939 XMVECTOR lightDiffuseColor;
40- uint32_t enableSER;
4140 uint32_t sortMode;
4241};
4342
You can’t perform that action at this time.
0 commit comments