One Logo Pool Ball
RealityFoundation · IOS API REFERENCE

DiffuseProbeResource

class · iOS 27.0+ · SDK 27.1

final class DiffuseProbeResource

A resource containing baked diffuse lighting data organized as a tetrahedral probe mesh. Diffuse probe resources store spherical harmonic coefficients at discrete 3D positions, connected via a tetrahedral mesh for efficient runtime interpolation. This compact representation enables high probe density throughout a scene, allowing dynamic objects to receive accurate diffuse lighting as they move through different lighting conditions. ## Probe Data Format Each probe stores first-order (L0 + L1) spherical harmonics: 4 coefficients per RGB channel, for a total of 12 floats (48 bytes) per probe. The tetrahedral mesh adds minimal per-tetrahedron overhead. This compact representation enables high probe density within typical memory budgets. ## See Also - ``DiffuseLightProbeGroupComponent`` - ``DiffuseLightProbeReceiverComponent``

Members (1)

init · iOS 27.0+

init

TypeScript
static init(positions: Array<SDKHandle>, coefficients: Array<SDKHandle>, tetrahedronIndices: Array<SDKHandle>): DiffuseProbeResource
Swift declaration
nonisolated convenience init(positions: [SIMD3<Float>], coefficients: [InlineArray<3, SIMD4<Float>>], tetrahedronIndices: [SIMD4<UInt16>]) throws

Creates a diffuse probe resource from arrays of probe data. - Parameters: - positions: The 3D positions of each probe, in local space relative to the probe group entity. Must contain at least 4 positions to form a valid tetrahedral mesh. - coefficients: Spherical harmonic coefficients for each probe. Each entry contains exactly 3 `SIMD4<Float>` values — one per RGB channel, ordered as `(L0, L1.x, L1.y, L1.z)`. Must have the same count as `positions`. - tetrahedronIndices: Indices defining the tetrahedral mesh connectivity. Each `SIMD4<UInt16>` references 4 probe positions by index into `positions`. Must contain at least 1 tetrahedron, and all indices must be less than `positions.count`. - Throws: An error if the data is invalid — for example, if `positions.count` and `coefficients.count` differ, if fewer than 4 probes are provided, or if any tetrahedral index is out of bounds.

Skipped declarations

No declarations were skipped in this snapshot.

All RealityFoundation types →