Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 2a3e4a9

Browse files
committed
Dying Light 2 has a broken dlssg implementation
1 parent 4a577e3 commit 2a3e4a9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

source/maindll/FFFrameInterpolator.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,25 @@ bool FFFrameInterpolator::CalculateResourceDimensions(NGXInstanceParameters *NGX
342342
if (m_PostUpscaleRenderWidth <= 32 || m_PostUpscaleRenderHeight <= 32)
343343
return false;
344344

345+
// I've no better place to put this. Dying Light 2 is beyond screwed up.
346+
//
347+
// 1. They take a D24 depth buffer and explicitly convert it to RGBA8. The GBA channels are unused. This
348+
// is passed to Streamline as the "depth" buffer.
349+
//
350+
// 2. They take the same RGBA8 "depth" buffer above and pass it to Streamline as the "HUD-less" color
351+
// buffer.
352+
//
353+
// How's it possible to be this incompetent? Have these people used a debugger? The debug visualizer? For
354+
// all I know the native DLSS-G implementation doesn't even work. It could just be duplicating frames.
355+
const static auto isDyingLight2 = GetModuleHandleW(L"DyingLightGame_x64_rwdi.exe") != nullptr;
356+
357+
if (isDyingLight2)
358+
{
359+
NGXParameters->SetVoidPointer("DLSSG.HUDLess", nullptr);
360+
m_PostUpscaleRenderWidth = m_SwapchainWidth;
361+
m_PostUpscaleRenderHeight = m_SwapchainHeight;
362+
}
363+
345364
return true;
346365
}
347366

0 commit comments

Comments
 (0)