Contents

init(positions:coefficients:tetrahedronIndices:)

Creates a diffuse probe resource from arrays of probe data.

Declaration

@MainActor convenience init(positions: [SIMD3<Float>], coefficients: [InlineArray<3, SIMD4<Float>>], tetrahedronIndices: [SIMD4<UInt16>]) throws

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.

Discussion