I have 2 planes with textures on. I want these planes to intersect [ –|– ], and I want the blend mode to be additive. Currently I get z fighting on the planes, and I can't see how to set blend modes.
I've done this before in Unity and Godot in a fairly straight forward manner.
How do I accomplish this with RealityKit, preferably using code only (my scene is quite dynamic)?
Do I need to do it with a shader manually? How can I stop the z fighting?
Just found this which works a treat:
let surfaceShader = CustomMaterial.SurfaceShader(named: "textureAndTint", in: library)
var descriptor = CustomMaterial.Program.Descriptor()
descriptor.lightingModel = .unlit
descriptor.blendMode = .add
let program = try! await CustomMaterial.Program(surfaceShader: surfaceShader, descriptor: descriptor)
var customMaterial = CustomMaterial(program: program)