| 81 | //////////////////////////////////////////////////////////////////////////////// |
| 82 | |
| 83 | inline Vec3fa powerCosineSampleHemisphere(const float n, const Vec2f &s) |
| 84 | { |
| 85 | const float phi =float(two_pi) * s.x; |
| 86 | const float cosTheta = pow(s.y, 1.0f / (n + 1.0f)); |
| 87 | return cartesian(phi, cosTheta); |
| 88 | } |
| 89 | |
| 90 | inline float powerCosineSampleHemispherePDF(const float cosTheta, const float n) // TODO: order of arguments |
| 91 | { |
no test coverage detected