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()
1554
1554
const XMVECTOR& prevLightPosition = m_sceneCB[prevFrameIndex].lightPosition ;
1555
1555
m_sceneCB[frameIndex].lightPosition = XMVector3Transform (prevLightPosition, rotate);
1556
1556
}
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
+ {
1559
1563
m_sceneCB[frameIndex].sortMode = SORTMODE_BY_HIT;
1564
+ }
1560
1565
else if (m_sortByMaterial)
1566
+ {
1561
1567
m_sceneCB[frameIndex].sortMode = SORTMODE_BY_MATERIAL;
1568
+ }
1562
1569
else if (m_sortByBoth)
1570
+ {
1563
1571
m_sceneCB[frameIndex].sortMode = SORTMODE_BY_BOTH;
1564
- else
1565
- m_sceneCB[frameIndex].sortMode = SORTMODE_OFF;
1572
+ }
1566
1573
}
1567
1574
1568
1575
void D3D12RaytracingSakuraForestSER::DoRaytracing ()
Original file line number Diff line number Diff line change @@ -37,7 +37,6 @@ struct SceneConstantBuffer
37
37
XMVECTOR lightPosition;
38
38
XMVECTOR lightAmbientColor;
39
39
XMVECTOR lightDiffuseColor;
40
- uint32_t enableSER;
41
40
uint32_t sortMode;
42
41
};
43
42
You can’t perform that action at this time.
0 commit comments