Repository navigation
Fix sRGB color conversion in the Metal presenter - #2
Merged
Merged
Conversation
TxCsOffc
approved these changes
Nov 25, 2026
TxCsOffc
left a comment
Owner
There was a problem hiding this comment.
Verified the sRGB decode/re-encode logic for RGBA8Unorm_sRGB/BGRA8Unorm_sRGB sources into BGRA8Unorm drawables and frame readback, and confirmed kyty_emulator builds cleanly on macOS arm64. Merging!
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.
Change
Metal reads sRGB textures as linear values. The presenter wrote those values directly to a
BGRA8Unormdrawable, leaving the 8-bit sRGB flip images too dark and making some colors appear oversaturated. Encode the values back to sRGB forRGBA8Unorm_sRGBandBGRA8Unorm_sRGBsources, using the same presentation shader for the drawable and frame readback.Validation
Built and ran KyTx on a Mac mini M4 (macOS 27.2.1). Compared the title menu of Is This Seat Taken? (PPSA37001) with a PS5 reference capture. Values are median RGB samples from corresponding regions.
The game capture used an RGBA8 sRGB flip texture. BGRA8 sRGB follows the same conversion branch and was not exercised by this capture.