I'm trying to load a model and texture in RealityKit (set up in an ARView instance), but I can't seem to figure out how to specify the material should be two-sided.
I have the model loaded up as a ModelEntity, the texture loaded up as a TextureResource. The model and texture are loading up, but are rending one-sided. Since the model is open (i.e., back faces are visible), there are gaps on how it is rendered.
So far, I have,
let entity: ModelEntity = try .loadModel(named: "model.obj")
var material = SimpleMaterial()
material.baseColor = try .texture(.load(named: "texture.png"))
entity.model?.materials = [material]
I was hoping to find a property such as
material.twoSided = true
but so far, I have not found the equivalent thing in RealityKit.
Anyone know how to set two-sided materials in RealityKit?
