mac-capture: Use RGBA64Half pixel format for screen capture #13030
+14
−3
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.
Description
Changes ScreenCaptureKit content to use the RGBA64Half pixel format, improving both color and transparency fidelity for macOS Screen Capture.
Motivation and Context
Existing macOS Screen Captures have poor transparency fidelity because of the
l10rpixel format, which uses only two bits of alpha, but which features high fidelity 10-bit color for representing content in the Display P3 color space.Using RGBA64 enables us to both improve color fidelity with 16 bit floats per channel of color while granting the same fidelity to the alpha channel.
Higher fidelity transparency allows users to composite macOS Screen Capture window and application captures in front of arbitrary content in OBS with accurate transparency, enabling various creative usecases.
l10r(before) /RGhA(after):Supersedes #12945.
Note
Support for this format inside ScreenCaptureKit is technically not documented. It is, however, used internally by macOS, and we have received guidance indicating that it should be acceptable to use for our purposes.
How Has This Been Tested?
Tested on Apple Silicon, macOS 15.7.1.
This change should be further verified to work on earlier macOS deployment targets, particularly macOS 13, before merging.
Types of changes
Checklist: