SphericalHarmonics

data class SphericalHarmonics(val bands: Int, val coefficients: FloatArray)

Spherical harmonics coefficients for diffuse irradiance.

Parameters

bands

Number of SH bands (1, 2, or 3 — determines coefficient count: 1, 4, or 9).

coefficients

Packed RGB SH coefficients; length must be bands² × 3.

Constructors

Link copied to clipboard
constructor(bands: Int, coefficients: FloatArray)

Types

Link copied to clipboard
object Companion

Built-in ambients with no texture to load: IndirectLight(irradiance = SphericalHarmonics.Daylight). They give PBR models shape in their shadows before you have an environment of your own. They have no reflections, so metals look dull. Baked with cmgen from Filament's CC0 environments and scaled to the same average brightness, so they swap at the default intensity; rotation turns the brightest side.

Properties

Link copied to clipboard
val bands: Int
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int