iosmetalhdrimages

Is there a workflow for using an HDR image for an irradiance map?


For Metal on iOS is there a workflow for using an HDR image - .hdr or .exr format - for an irradiance map?


Solution

  • You can load an HDR file in RGBE format by converting its shared-exponent representation into one of Metal's pixel formats (such as MTLPixelFormatRGB9E5Float or RGBA16Float, both of which are filterable). From there, you'd just sample it and use it in your shader.