19 #if !defined(__NORI_WARP_H)
22 #include <nori/common.h>
23 #include <nori/sampler.h>
Abstract sample generator.
A collection of useful warping functions for importance sampling.
static float squareToUniformDiskPdf(const Point2f &p)
Probability density of squareToUniformDisk()
static Vector3f sampleUniformHemisphere(Sampler *sampler, const Normal3f &northPole)
Uniformly sample a vector on the unit hemisphere with respect to solid angles (naive implementation)
static float squareToUniformHemispherePdf(const Vector3f &v)
Probability density of squareToUniformHemisphere()
static float squareToUniformSphereCapPdf(const Vector3f &v, float cosThetaMax)
Probability density of squareToUniformSphereCap()
static Point2f squareToUniformSquare(const Point2f &sample)
Dummy warping function: takes uniformly distributed points in a square and just returns them.
static Vector3f squareToCosineHemisphere(const Point2f &sample)
Uniformly sample a vector on the unit hemisphere around the pole (0,0,1) with respect to projected so...
static Vector3f squareToBeckmann(const Point2f &sample, float alpha)
Warp a uniformly distributed square sample to a Beckmann distribution * cosine for the given 'alpha' ...
static Vector3f squareToUniformSphere(const Point2f &sample)
Uniformly sample a vector on the unit sphere with respect to solid angles.
static float squareToCosineHemispherePdf(const Vector3f &v)
Probability density of squareToCosineHemisphere()
static Vector3f squareToUniformHemisphere(const Point2f &sample)
Uniformly sample a vector on the unit hemisphere around the pole (0,0,1) with respect to solid angles...
static Point2f squareToUniformDisk(const Point2f &sample)
Uniformly sample a vector on a 2D disk with radius 1, centered around the origin.
static float squareToBeckmannPdf(const Vector3f &m, float alpha)
Probability density of squareToBeckmann()
static Vector3f squareToUniformSphereCap(const Point2f &sample, float cosThetaMax)
Uniformly sample a vector on a spherical cap around (0, 0, 1)
static float squareToUniformSpherePdf(const Vector3f &v)
Probability density of squareToUniformSphere()
static float squareToUniformSquarePdf(const Point2f &p)
Probability density of squareToUniformSquare()
3-dimensional surface normal representation