MCPcopy Create free account
hub / github.com/TheRealMJP/BakingLab / ApproximateSGIntegral

Function ApproximateSGIntegral

BakingLab/SG.h:54–57  ·  view source on GitHub ↗

Computes the approximate integral of an SG over the entire sphere. The error vs. the non-approximate version decreases as sharpeness increases.

Source from the content-addressed store, hash-verified

52// Computes the approximate integral of an SG over the entire sphere. The error vs. the
53// non-approximate version decreases as sharpeness increases.
54inline Float3 ApproximateSGIntegral(const SG& sg)
55{
56 return 2 * Pi * (sg.Amplitude / sg.Sharpness);
57}
58
59// Computes the approximate incident irradiance from a single SG lobe containing incoming radiance.
60// The irradiance is computed using a fitted approximation polynomial. This approximation

Callers 1

SGIrradianceFittedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected