Package limn.render3d
Class IrradianceSh
java.lang.Object
limn.render3d.IrradianceSh
Order-2 (9-coefficient) spherical-harmonic irradiance baked from an
Environment, the diffuse half of image-based lighting (Ramamoorthi &
Hanrahan 2001). The environment radiance is projected onto the SH basis over a
deterministic Fibonacci-sphere sampling and convolved with the cosine lobe, so
evaluate(limn.math.Vec3)(n) gives the average irradiance reaching a surface with
normal n (multiply by albedo for diffuse). Deterministic: same input →
identical coefficients, so it is unit-testable headless.-
Method Summary
Modifier and TypeMethodDescriptionstatic IrradianceShbake(Environment environment) Projects an environment into spherical harmonics: done once, not per frame.static IrradianceShbake(Environment environment, int samples) Bakes withsamplesdeterministic directions (higher = smoother).Vec3[]The 9 SH coefficients (for uploading to a shader asvec3[9]).Irradiance for a surface normal (clamped non-negative).
-
Method Details
-
coefficients
The 9 SH coefficients (for uploading to a shader asvec3[9]). -
bake
Projects an environment into spherical harmonics: done once, not per frame. -
bake
Bakes withsamplesdeterministic directions (higher = smoother). -
evaluate
Irradiance for a surface normal (clamped non-negative).
-