[RFC] Granblue native SDR workaround for severe output color corruption#158
Draft
Avalonere wants to merge 1 commit into
Draft
[RFC] Granblue native SDR workaround for severe output color corruption#158Avalonere wants to merge 1 commit into
Avalonere wants to merge 1 commit into
Conversation
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.
Warning
This is a diagnostic workaround / RFC, not a complete solution and should not be merged as-is without deciding the intended SDR/HDR behavior. The patch deliberately disables Granblue's swapchain upgrade and Luma display composition for every display mode. It fixes the reported severe SDR output corruption, but it also removes Luma HDR output for this addon.
What this draft establishes
This is not an overlay-only issue. On the affected SDR system, enabling the original Granblue addon makes the game image itself severely and unacceptably distorted in color and brightness. ReShade, Steam, and RTSS overlays are corrupted at the same time, with bright UI colors becoming especially neon-looking. Selecting SDR in Luma's Display Mode does not prevent the problem. Disabling the addon restores both the game image and the overlays immediately.
Granblue Fantasy: Relink creates a
DXGI_FORMAT_R8G8B8A8_UNORMSDR swapchain. The addon currently upgrades it to a linear scRGB backbuffer and runs Luma's display-composition path even when SDR output is selected. As a minimal A/B test, this patch preserves the native UNORM swapchain and disables that display-composition path. On the affected system, this restores normal color and brightness for both the actual game rendering and third-party overlays.The result isolates the problem to the upgraded swapchain / final display-composition output path. Because this diagnostic patch changes both parts together, it does not yet prove which individual operation, or combination of operations, is solely responsible.
What the patch currently does
swapchain_format_upgrade_typetoTextureFormatUpgradesType::None.swapchain_upgrade_typetoSwapchainUpgradeType::None.force_disable_display_composition = true, because the shared display-composition path currently targets scRGB/HDR10 and outputs linear scRGB rather than an sRGB-encoded UNORM result.texture_format_upgrades_type = TextureFormatUpgradesType::AllowedEnabled, so internal texture format upgrades are not globally disabled.Why this is not the final solution
Possible final directions
Native SDR Swapchainoption and require a restart or swapchain recreation when it changes.R8G8B8A8_UNORMtarget with an explicit linear-to-sRGB output transform, so the complete SDR game image and later overlay rendering use the expected encoding.Validation
Development-Release | x64andPublishing-Release | x64using Visual Studio 2022 Build Tools.git diff --checkpasses.