core: Define VK_USE_PLATFORM_XCB_KHR before including vkd3d_utils.h.
[vkmodelviewer.git] / Core / TemporalEffects.h
blob0d830c09f02b3ca040b1ffe85198cc25a44630b3
1 //
2 // Copyright (c) Microsoft. All rights reserved.
3 // This code is licensed under the MIT License (MIT).
4 // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
5 // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
6 // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
7 // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
8 //
9 // Developed by Minigraph
11 // Author: James Stanard
14 #pragma once
16 #include "EngineTuning.h"
18 class CommandContext;
19 class DepthBuffer;
21 namespace TemporalEffects
23 // Temporal antialiasing involves jittering sample positions and accumulating color over time to
24 // effectively supersample the image.
25 extern BoolVar EnableTAA;
27 void Initialize( void );
29 void Shutdown( void );
31 // Call once per frame to increment the internal frame counter and, in the case of TAA, choosing the next
32 // jittered sample position.
33 void Update( uint64_t FrameIndex );
35 // Returns whether the frame is odd or even
36 uint32_t GetFrameIndexMod2( void );
38 // Jitter values are neutral at 0.5 and vary from [0, 1). Jittering only occurs when temporal antialiasing
39 // is enabled. You can use these values to jitter your viewport or projection matrix.
40 void GetJitterOffset( float& JitterX, float& JitterY );
42 void ClearHistory(CommandContext& Context);
44 void ResolveImage(CommandContext& Context);