Nori  24
Warp Class Reference

A collection of useful warping functions for importance sampling. More...

#include <warp.h>

Static Public Member Functions

static Vector3f sampleUniformHemisphere (Sampler *sampler, const Normal3f &northPole)
 Uniformly sample a vector on the unit hemisphere with respect to solid angles (naive implementation)
 
static Point2f squareToUniformSquare (const Point2f &sample)
 Dummy warping function: takes uniformly distributed points in a square and just returns them.
 
static float squareToUniformSquarePdf (const Point2f &p)
 Probability density of squareToUniformSquare()
 
static Point2f squareToUniformDisk (const Point2f &sample)
 Uniformly sample a vector on a 2D disk with radius 1, centered around the origin.
 
static float squareToUniformDiskPdf (const Point2f &p)
 Probability density of squareToUniformDisk()
 
static Vector3f squareToUniformSphere (const Point2f &sample)
 Uniformly sample a vector on the unit sphere with respect to solid angles.
 
static float squareToUniformSpherePdf (const Vector3f &v)
 Probability density of squareToUniformSphere()
 
static Vector3f squareToUniformSphereCap (const Point2f &sample, float cosThetaMax)
 Uniformly sample a vector on a spherical cap around (0, 0, 1) More...
 
static float squareToUniformSphereCapPdf (const Vector3f &v, float cosThetaMax)
 Probability density of squareToUniformSphereCap()
 
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 float squareToUniformHemispherePdf (const Vector3f &v)
 Probability density of squareToUniformHemisphere()
 
static Vector3f squareToCosineHemisphere (const Point2f &sample)
 Uniformly sample a vector on the unit hemisphere around the pole (0,0,1) with respect to projected solid angles.
 
static float squareToCosineHemispherePdf (const Vector3f &v)
 Probability density of squareToCosineHemisphere()
 
static Vector3f squareToBeckmann (const Point2f &sample, float alpha)
 Warp a uniformly distributed square sample to a Beckmann distribution * cosine for the given 'alpha' parameter.
 
static float squareToBeckmannPdf (const Vector3f &m, float alpha)
 Probability density of squareToBeckmann()
 
static Vector3f squareToUniformTriangle (const Point2f &sample)
 

Detailed Description

A collection of useful warping functions for importance sampling.

Definition at line 28 of file warp.h.

Member Function Documentation

◆ squareToUniformSphereCap()

Vector3f Warp::squareToUniformSphereCap ( const Point2f sample,
float  cosThetaMax 
)
static

Uniformly sample a vector on a spherical cap around (0, 0, 1)

A spherical cap is the subset of a unit sphere whose directions make an angle of less than 'theta' with the north pole. This function expects the cosine of 'theta' as a parameter.

Definition at line 57 of file warp.cpp.


The documentation for this class was generated from the following files: