public struct ShCoefficientsAn order-2 spherical-harmonic projection: nine coefficients per channel.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The field names are the shader's — Raven/Library/Shading/Ibl.rvn declares ShCoefficients with exactly these nine, in this order — because the two are one layout with a GPU in the middle. A field renamed on one side and not the other puts the z lobe where the y lobe should be, which tilts the ambient light off axis and looks like a bad probe rather than a mismatched struct.
Nine numbers is enough for diffuse and nowhere near enough for specular, which is the whole division of labour in image-based lighting: irradiance is so smooth that order-2 reproduces it to within a percent, and reflections are not, so they stay a cubemap.
Fields and properties (9)
public Vector3 L00The constant term — the environment's average radiance, scaled.
public Vector3 L1m1The linear term along Y.
public Vector3 L10The linear term along Z.
public Vector3 L11The linear term along X.
public Vector3 L2m2The quadratic XY term.
public Vector3 L2m1The quadratic YZ term.
public Vector3 L20The quadratic term along Z.
public Vector3 L21The quadratic XZ term.
public Vector3 L22The quadratic X²−Y² term.
Methods (3)
public static ShCoefficients operator +(ShCoefficients left, ShCoefficients right)Adds two projections, which is what blending two probes is.
public static ShCoefficients operator *(ShCoefficients coefficients, float scale)Scales a projection, which is what weighting a probe is.
public static ShCoefficients operator *(float scale, ShCoefficients coefficients)Scales a projection.
Used by (8)
- ArenaThirdPersonShooter
- ArenaFrameThirdPersonShooter
- EnvironmentLightVixen.Rendering
- EnvironmentLightingTestsVixen.Rendering.Tests
- LightProbeVixen.Rendering
- LightProbeTestsVixen.Rendering.Tests
- LightProbeVolumeVixen.Rendering
- SphericalHarmonicsVixen.Rendering