MetalEDR-iOS

Demo of using Metal to render EDR/HDR content on iOS platform.
MetalEDR-iOS

How it works

This demo uses a hack to activate EDR display on iOS platform:

Then we can use Metal with a Float Point pixel format to output EDR contents.

Limitation

The "EDR trigger" hack basically has the same effect with metalLayer.wantsExtendedDynamicRangeContent = YES;,

But we still missing APIs like -[NSScreen maximumExtendedDynamicRangeColorComponentValue], so it's very hard to apply appropriate tone-mapping within Metal rendering process.

This demo outputs the raw pixel values loaded by CoreGraphics without applying any tone-mapping, so the colors will clip at current EDR max value and may seems off.

GitHub

https://github.com/Naituw/MetalEDR-iOS