Contents

writesDepth

A boolean value that determines whether this material writes its depth into RealityKit’s depth buffer.

Declaration

var writesDepth: Bool { get set }

Discussion

If true, meshes with this material will occlude objects behind them by writing their depth into RealityKit’s depth buffer.

If false, meshes with this material will not write their depth into RealityKit’s depth buffer, and may be overwritten by objects drawn behind them, depending on draw order.

The default value is true.

See Also

Setting depth testing properties