Skip to content

Comments

Enable custom HDR luminance via INI and env var#528

Open
christopher-conley wants to merge 1 commit intoNukem9:masterfrom
christopher-conley:custom-hdr-luminance
Open

Enable custom HDR luminance via INI and env var#528
christopher-conley wants to merge 1 commit intoNukem9:masterfrom
christopher-conley:custom-hdr-luminance

Conversation

@christopher-conley
Copy link

This enables the user to manually specify min/max HDR luminance settings instead of what's returned from DXGI query or the hardcoded default values.

Adds the following as environment variables and INI settings:
EnableHDRLuminanceOverride (bool)
HDRLuminanceMin (float)
HDRLuminanceMax (float)

Also adds an overload for Util::GetSetting which returns a float value to read into HDRLuminanceMin and HDRLuminanceMax.

FFFrameInterpolator::QueryHDRLuminanceRange is modified to check if the user has overridden the default hardcoded values via env var or INI setting and prefers to use those values first if EnableHDRLuminanceOverride is true and a custom value has been provided.

An example of the INI configuration file would look like this:

;
; Note: this is an optional file for dlssg_to_fsr3. Normal users can safely ignore or delete this INI.
;
; 
; FSR 3 developer debug options
;

[Debug]
EnableDebugOverlay=0
EnableDebugTearLines=0
EnableInterpolatedFramesOnly=0
EnableHDRLuminanceOverride=1
HDRLuminanceMin=0.5000
HDRLuminanceMax=1450.0

It didn't occur to me to commit an updated INI file example along with this, but I can do that if you'd like to merge this in. I've tested it on a few games and it appears to be working correctly.

This enables the user to manually specify min/max HDR luminance settings instead of what's returned from DXGI query or the hardcoded default values.

Adds EnableHDRLuminanceOverride, HDRLuminanceMin, and HDRLuminanceMax as environment variables and INI settings. Also adds an overload for Util::GetSetting which returns a float value to read HDRLuminanceMin and HDRLuminanceMax.

FFFrameInterpolator::QueryHDRLuminanceRange is modified to check if the user has overridden the default hardcoded values via env var or INI setting and prefers to use those values first if EnableHDRLuminanceOverride is true and a custom value has been provided.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant