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.
9 // Developed by Minigraph
11 // Author: James Stanard
16 #include "EngineTuning.h"
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
);