fix: 修复截图帧数不一致问题,改为30帧
This commit is contained in:
@@ -1120,13 +1120,13 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine
|
|||||||
staticMeshComponent.Render(commandList);
|
staticMeshComponent.Render(commandList);
|
||||||
|
|
||||||
// On screenshot frame, don't transition to PRESENT - keep RENDER_TARGET for screenshot
|
// On screenshot frame, don't transition to PRESENT - keep RENDER_TARGET for screenshot
|
||||||
if (frameCount != 120) {
|
if (frameCount != 30) {
|
||||||
EndRenderToSwapChain(commandList);
|
EndRenderToSwapChain(commandList);
|
||||||
}
|
}
|
||||||
EndCommandList();
|
EndCommandList();
|
||||||
|
|
||||||
// On screenshot frame, don't Present - we'll screenshot before next frame
|
// On screenshot frame, don't Present - we'll screenshot before next frame
|
||||||
if (frameCount != 120) {
|
if (frameCount != 30) {
|
||||||
SwapD3D12Buffers();
|
SwapD3D12Buffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user