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

Overview

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

You might also like...
Demo project to sync color changes to an Raspberry Pi Mood Light via iOS/Android
Demo project to sync color changes to an Raspberry Pi Mood Light via iOS/Android

Raspberry Pi Mood Light Demo project to remotely control an Raspberry Pi Mood Light over Bluetooth via iOS and Android. 📺 Watch the video Overview In

A demo project with VIPER architecture
A demo project with VIPER architecture

AQIDemo What is it? A demo project with VIPER architecture. All views, Interactors Presenter and routers are in place with their respective folder. Ap

Demo app to demonstrate native blur capabilities
Demo app to demonstrate native blur capabilities

Blurrable Demo app to demonstrate native blur capabilities. You can customize th

Google-Blogger-iOS-App - Using Google Blogger API to build an iOS app like Medium

Google Blogger iOS App Using Google Blogger API to build an iOS app like Medium!

Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

Custom MacBook login screen and pam modules using multipeer connectivity and usb hardware checks with iOS app for sign in.

iOS application to extract accession numbers from wall labels using Vision and VisionKit frameworks.
iOS application to extract accession numbers from wall labels using Vision and VisionKit frameworks.

iOS application to extract accession numbers from wall labels using Vision and VisionKit frameworks. Important This is experimenta

IOS Swift Application using VIPER Architecture

IOS Swift Application using VIPER Architecture. This is a simple design application for E-Commerce using VIPER architecture and CoreData, I prefer using Delegate Protocols rather than Third Party Library such as Rx but at this project I make it as an example on how to using VIPER.The application also support localization.

a playground app using `MultipeerConnectivity` to transfor data wirelessly between iOS / iPadOS

README An example app using MultipeerConnectivity to transfor data wirelessly between iOS / iPadOS. Both using Data and Stream to transfer data are su

Comments
  • Better workaround

    Better workaround

    Hey,

    Thank you so much for sharing this demo!

    I was playing a lot with this and found that there is an easier way to enable EDR on the MTKView: The wantsExtendedDynamicRangeContent property is actually there on iOS as well, just not public. So you can just use KVO to enable EDR rendering:

    [self.layer setValue:[NSNumber numberWithBool:YES] forKey:@"wantsExtendedDynamicRangeContent"];
    

    No need to add a hidden AVPlayerLayer anymore. 🙂

    Similarly, you can also query the EDR properties of the screen:

    [[UIScreen mainScreen] valueForKey:@"extendedDynamicRangeCurrentHeadroom"];
    [[UIScreen mainScreen] valueForKey:@"extendedDynamicRangePotentialHeadroom"];
    [[UIScreen mainScreen] valueForKey:@"extendedDynamicRangeReferenceHeadroom"];
    

    I hope that helps. Thanks again!

    opened by frankschlegel 0
Owner
Wutian
Creator of Maipo for Weibo (formerly WeiboX)
Wutian
The app allows the user to change text color and text content when the displayed button is clicked

Hello World! App Description This application allows the user to change text color and text content when the displayed button is clicked. App Walk-tho

null 0 Mar 15, 2022
Activity Content SDK

Activity-content-swift - The Activity Content SDK is a library that supports converting DSNP Activity Content data to and from JSON

ProjectLiberty.io 0 Jan 26, 2022
The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS

Outline Client The Outline Client is a cross-platform VPN or proxy client for Windows, macOS, iOS, Android, and ChromeOS. The Outline Client is design

Jigsaw 7.3k Dec 31, 2022
nds4ios is a port of the multi-platform Nintendo DS emulator, DeSmuME to iOS.

nds4ios Supports iOS 6 to iOS 9. nds4ios is a port of the multi-platform Nintendo DS emulator, DeSmuME to iOS. Currently, emulation is powered by a th

Kevin 162 Dec 25, 2022
Easily generate cross platform Swift framework projects from the command line

SwiftPlate Easily generate cross platform Swift framework projects from the command line. SwiftPlate will generate Xcode projects for you in seconds,

John Sundell 1.8k Dec 27, 2022
Cross-platform, sophisticated frontend for the libretro API.

RetroArch is the reference frontend for the libretro API. Popular examples of implementations for this API includes video game system emulators and game engines as well as more generalized 3D programs. These programs are instantiated as dynamic libraries. We refer to these as "libretro cores".

null 7.4k Dec 27, 2022
Cross-platform instrumentation and introspection library written in C

Gum Cross-platform instrumentation and introspection library written in C. This library is consumed by frida-core through its JavaScript bindings, Gum

Frida 524 Jan 4, 2023
A Swift cross-platform (Apple and Linux) networking library.

KippleNetworking A Swift library that offers cross-platform (Apple and Linux) networking support, intended for the creation of cross-platform SDKs to

Kipple 11 Sep 20, 2022
Cross-platform Swift library for accessing the public GitHub API.

GoatHerb GoatHerb is a cross-platform Swift library for accessing the GitHub API. Features General Compatible with swift-log. Full concurrency (async/

Brian Drelling 3 Oct 30, 2022
iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android).

FinanceReactNative iOS's Stocks App clone written in React Native for demo purpose (available both iOS and Android). Data is pulled from Yahoo Finance

kf 2k Dec 29, 2022