Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.41 KB

File metadata and controls

33 lines (22 loc) · 1.41 KB

MetalEDR-iOS

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

screenshot

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.

Credit