Skip to content

Commit 390aa4a

Browse files
committed
Anti-Lag 2 SDK v2.0.0a
1 parent 55f6ce7 commit 390aa4a

File tree

1 file changed

+22
-2
lines changed

1 file changed

+22
-2
lines changed

README.md

+22-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,27 @@ In order to achieve this improved latency reduction, the game developer needs to
3838
## FSR 3 Frame Generation Support
3939
Anti-Lag 2 requires some special attention when FSR 3 frame generation is enabled. There are a couple of extra Anti-Lag 2 functions required to be called to let Anti-Lag 2 know whether the presented frames are interpolated or not.
4040

41-
Until Anti-Lag 2 is supported in the public open-source release of FSR 3 (which is coming soon), developers are advised to reach out to their Developer Technology contacts at AMD.
41+
`AMD::AntiLag2DX12::MarkEndOfFrameRendering(&context)` should be called once the game's main rendering workload has been submitted, before the FSR 3 Present call is made.
42+
43+
`AMD::AntiLag2DX12::SetFrameGenFrameType(&context,bInterpolatedFrame)` also needs to be called, but FSR 3.1.1 onwards calls this for you. However, for this to work, you will need to poke some data into the DXGI swapchain's private data each frame using a specific struct format using a specific GUID.
44+
45+
An example of this would look something as follows:
46+
47+
```C++
48+
// {5083ae5b-8070-4fca-8ee5-3582dd367d13}
49+
static const GUID IID_IFfxAntiLag2Data =
50+
{0x5083ae5b, 0x8070, 0x4fca, {0x8e, 0xe5, 0x35, 0x82, 0xdd, 0x36, 0x7d, 0x13}};
51+
52+
struct AntiLag2Data
53+
{
54+
AMD::AntiLag2DX12::Context* context;
55+
bool enabled;
56+
} data;
57+
58+
data.context = &m_AntiLag2Context;
59+
data.enabled = m_AntiLag2Enabled;
60+
pSwapChain->SetPrivateData( IID_IFfxAntiLag2Data, sizeof( data ), &data );
61+
```
4262
4363
# Testing
4464
@@ -69,7 +89,7 @@ OS:
6989
7090
# Strings
7191
72-
Recommended UI text can be found here: https://gpuopen.com/fidelityfx-naming-guidelines/
92+
Recommended UI text can be found here: https://gpuopen.com/fidelityfx-naming-guidelines/#antilag2
7393
7494
<h2>Open source</h2>
7595

0 commit comments

Comments
 (0)