MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / Pdf

Method Pdf

src/slg/core/sphericalfunction/sphericalfunction.cpp:104–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102}
103
104float SampleableSphericalFunction::Pdf(const Vector &w) const {
105 const float theta = SphericalTheta(w);
106 const float phi = SphericalPhi(w);
107
108 return uvDistrib->Pdf(phi * INV_TWOPI, theta * INV_PI) /
109 (2.f * M_PI * M_PI * sinf(theta));
110}
111
112float SampleableSphericalFunction::Average() const {
113 return average;

Callers

nothing calls this directly

Calls 2

SphericalThetaFunction · 0.85
SphericalPhiFunction · 0.85

Tested by

no test coverage detected