Skip to content

Greedfall 2 - #561

Open
RankFTW wants to merge 1138 commits into
clshortfuse:mainfrom
RankFTW:main
Open

Greedfall 2#561
RankFTW wants to merge 1138 commits into
clshortfuse:mainfrom
RankFTW:main

Conversation

@RankFTW

@RankFTW RankFTW commented May 11, 2026

Copy link
Copy Markdown

HDR mod for Greedfall 2 (DX12, Silk Engine).

Game renders HDR internally then tonemaps with Narkowicz ACES in a compute pass and blits to an R8G8B8A8 swapchain. No native HDR.

Replaces three shaders:

0x6DE32B48 (tonemap compute): skips ACES, PQ-encodes pre-tonemap HDR through existing R10G10B10A2 buffer
0xF27041D0 (compositing): PQ-encodes UI at controlled brightness, composites with inverted alpha
0xD2C8C305 (final blit): PQ decodes, applies ToneMapPass, outputs scRGB to float16 swapchain
Features:

ACES and RenoDRT tonemapper options
Full color grading (exposure, contrast, saturation, highlights, shadows, blowout, flare, hue correction/shift)
Independent UI brightness control
Color temperature and black floor
Auto-exposure from original shader preserved
Main menu/loading screen passthrough via on_drawn flag detection
No resource upgrades required

Notes:

Does not use RenderIntermediatePass/SwapChainPass pattern. The intermediate R10G10B10A2 buffer between the tonemap and final blit cannot be upgraded to float16 on this game's DX12 pipeline (resource cloning causes rendering corruption). PQ encoding is used as a workaround to transport HDR through the 10-bit buffer. The final blit outputs scRGB directly to the float16 swapchain. HDR10 output mode is not supported as a result — WIP.

- Replace Sample() with SampleLevel() -- CS5 doesnt seem to like Sample()

- Add Lies of P Lutbuilders + Native HDR Composite shader
- Add UI/blit shaders
- Remove scuffed ui fix slider
- Add LAD Ishin Lutbuilders + composite shaders
- Use neutwo instead of Hermit

- Move display mappingto user peak to lutbuilder output

- displaymap in bt2020 vs. ap1
- Add high on life 2 lutbuilders

- Remove ExpandGamut in all SM6 Lutbuilders

- Process color in both of romeo's branches
- Use CorrectHueAndChrominanceOKLab with sdr/vanilla color for sdr blowout simulation

- Swap to Max CH tonemap

- Move ApplySaturationBlowoutHighlightSaturationAP1 to after displaymap to user peak so luts dont get griefed by feeding them a saturated color

- Clean up sliders
- Use HueAndChrominanceOKLab()

- Default Hue Shift to 50.f

- Default blowout to 70.f
- Thank you to Nick from the RenoDX discord
marat569 and others added 21 commits July 18, 2026 14:56
- Fix Hide UI to work in Filmic SDR
…n ue extended in working space, add new lut scaling method, ui polish, more
[UE-EXTENDED] Overhaul grading and LUT workflow
[UE-EXTENDED] Remove padding and fix formatting
- Change lut config defaults to 0.f for max ch and gamut compress since we handle that ourselves
…g, LMS bug fixes, fix blue correct use on hue/chroma reference
[UE-EXTENDED] Refactor LUT builder color processing
[UE-EXTENDED] LEGO Horizon Adventures
- Fix Max Ch scaling clamping to bt709 unintentionally
- Add a max(1e-7f clamp to filmic input and output in LMS

- Fix EOTF scaling being in advanced
@clshortfuse clshortfuse added the invalid This doesn't seem right label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.