I am working on implementing Image Based Lighting in a ray tracing project. In order to get the sampling to work predictably, I will need to load and process an HDR image into a MTLTexture.
While using a MTKTextureLoader to load .jpg and .png files has been super-smooth, loading a .hdr file in Swift seems to have a few barriers.
I have tried to follow the Processing HDR Images with Metal sample code [ Objective C ], but it relies on some finessing of pointers that I can't duplicate in Swift.
Is there currently a best way to move an HDR image into a Metal texture using Swift?
Thanks so much!
While using a MTKTextureLoader to load .jpg and .png files has been super-smooth, loading a .hdr file in Swift seems to have a few barriers.
I have tried to follow the Processing HDR Images with Metal sample code [ Objective C ], but it relies on some finessing of pointers that I can't duplicate in Swift.
Is there currently a best way to move an HDR image into a Metal texture using Swift?
Thanks so much!