I usually use a Cube Texture Set, where each of 6 images is square (height == width)
.
Also, the following cube map representations are supported:
- Vertical strip as single image
(height == 6 * width)
- Horizontal strip as single image
(6 * height == width)
- Spherical projection as single image
(2 * height == width)
Here's a SwiftUI code:
func makeUIView(context: Context) -> SCNView {
let sceneView = SCNView(frame: .zero)
sceneView.scene = SCNScene()
// if EXR or HDR is 2:1 spherical map, it really meets the requirements
sceneView.scene?.lightingEnvironment.contents = UIImage(named: "std.exr")
sceneView.backgroundColor = .black
sceneView.autoenablesDefaultLighting = true
sceneView.allowsCameraControl = true
let node = SCNNode()
node.geometry = SCNSphere(radius: 0.1)
node.geometry?.firstMaterial?.lightingModel = .physicallyBased
node.geometry?.firstMaterial?.metalness.contents = 1.0
sceneView.scene?.rootNode.addChildNode(node)
return sceneView
}
Pay particular attention – you need .physicallyBased
lighting model to get HDR or EXR reflections.

And let's set it for BG:
sceneView.scene?.background.contents = UIImage(named: "std.exr")

Why your .exr
doesn't work?
The solutions is simple: delete your .exr
from project, empty the Trash and after that drag-and-drop .exr
file, in Choose options for adding these files
window choose Add to targets
:

Now your .exr
must work.