First, create a new ReflectionSession
implementation with your SCNView
object. Note: You only need one ReflectionSession
object at a time.
let reflectionSession = ReflectionSession(inView: scnView)
Then, add the nodes that you want to be reflective to the ReflectionSession
using the addNode(_:roughness:)
method. Because .physicallyBased
materials won't work, the roughness value will determine how much to blur the cubemap images, simulating a roughness effect.
reflectionSession.addNode(node1)
reflectionSession.addNode(node2, roughness: 0.2)