0 Replies
      Latest reply on May 25, 2019 7:16 PM by macuser1984
      macuser1984 Level 1 Level 1 (0 points)

        For the color values I'm passing to my Metal shaders, I'm wanting to have them in P3 since the content of my MTKView is something that makes sense to have in P3. My question is that because these values are stored in extended sRGB (as recommended in WWDC 2016 605 What's New In Metal Part 2), what's the range (below 0.0 and above 1.0) that these values can fall in? Does it vary based on the color channel since the red and green channels are more affected by P3's wider space? Does it vary depending on whether the MTKView's colorPixelFormat is MTLPixelFormat.bgra10_xr or MTLPixelFormat.bgra10_xr_srgb, since the second one is doing gamma correction?


        Also, how does this affect getting to a UIColor equivalent to the value (and vice versa)? I'm having to convert between UIColor and a Metal-readable form (a float4) because the colors appearing in the MTKView are user-selected, thereby involving UIKit controls that need the color as a UIColor value.