Greedfall 2#561
Open
RankFTW wants to merge 1098 commits into
Open
Conversation
- Added custom callback functions to branch lutbuilder if no grading shaders exist
- Cleanup common.hlsl, most functions are merged to main now - Remove reno+rolloff, hermit does a better job
- Use Max CH to generate an SDR Color in grading shaders . Y TM clipped
- Replace Reinhard NeutralSDR with Reinhard Piecewise Max CH TM for all SDR Colors
- Fix UI flicker with some cursed math, temporary but better than nothing
There was a problem hiding this comment.
Pull request overview
Adds a RenoDX-based HDR mod integration for Greedfall 2 (DX12 / Silk Engine) by injecting custom shaders and exposing runtime tuning controls via the addon settings system. The approach transports HDR through the game’s existing 10-bit intermediate by PQ-encoding, then restores/tonemaps and outputs scRGB to a float16 swapchain.
Changes:
- Introduces a Greedfall2 addon with a
ShaderInjectDataconstant buffer and a comprehensive UI/settings surface for tonemapping + grading. - Adds three replacement shaders to bypass the game’s ACES compute tonemap, PQ-encode scene/UI for transport, then decode + tonemap and output scRGB.
- Adds a local Psycho test17 tonemapper implementation and updates
.gitignorefor common build/temp/log artifacts.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/games/greedfall2/shared.h |
Defines the injected constant buffer layout and renodx macro bindings for shaders. |
src/games/greedfall2/addon.cpp |
Registers the addon, hooks shader replacements, and defines user-facing settings that drive the injected constant buffer. |
src/games/greedfall2/0x6DE32B48.cs_6_0.hlsl |
Replaces the game tonemap compute pass: keeps auto-exposure, uses PQ transport (or vanilla ACES when disabled). |
src/games/greedfall2/0xF27041D0.cs_6_0.hlsl |
Replaces compositing: applies effects, PQ-encodes UI at controlled brightness, composites using inverted alpha. |
src/games/greedfall2/0xD2C8C305.ps_6_0.hlsl |
Replaces final blit: PQ-decodes, applies grading/tonemap, outputs scRGB to the float16 swapchain. |
src/games/greedfall2/psycho_test17.hlsl |
Adds Psycho tonemapper implementation used by the final blit when selected. |
.gitignore |
Ignores MSVC build output, dumps/tmp files, and common logs/artifacts. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…comment, include order
Author
|
addressed all 4 review comments, fixed double gamma encode, ShadowLift reset, updated comment, added explicit include |
- add Hide UI slider for native/ini HDR games - add lutbuilders (Hatred Far Far West, WW2 Rebuilder, Chained Together, Sprawl Zero) - add composite shaders (Sprawl Zero, The August Before) - add defaults for various games
feat(ue-extended):
fix(ue-extended):
… lutbuilder.py for the future
feat(ue-extended): Import lutbuilders from uegeneric
Add Blacktail support
RankFTW
force-pushed
the
main
branch
2 times, most recently
from
July 11, 2026 15:39
2f588ff to
da3d756
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.