Computes the approximate integral of an SG over the entire sphere. The error vs. the non-approximate version decreases as sharpeness increases.
| 52 | // Computes the approximate integral of an SG over the entire sphere. The error vs. the |
| 53 | // non-approximate version decreases as sharpeness increases. |
| 54 | inline 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 |
no outgoing calls
no test coverage detected