Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

WardShader Class Reference

An implementation of the Ward anisotropic BRDF model. More...

#include <surfaceshaders/WardShader.h>

Inheritance diagram for WardShader:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 WardShader (RGBTexture *diffuse_color, RGBTexture *specular_color, FloatTexture *alpha_x, FloatTexture *alpha_y)
rgb kernel (const Vector3 &w_out, const Vector3 &w_in, const HitRecord &rec, Context &context) const
double pdfDirection (const Vector3 &w_out, const Vector3 &w_in, const HitRecord &rec, Context &context) const
rgb sampleKernel (const Vector3 &w_out, const HitRecord &rec, Context &context, Vector3 &w_in, double &pdf) const

Detailed Description

An implementation of the Ward anisotropic BRDF model.

Todo:
Implement it, I suppose...


Member Function Documentation

rgb WardShader::kernel const Vector3 w_out,
const Vector3 w_in,
const HitRecord rec,
Context context
const [virtual]
 

Returns the value of the kernel ($brdfcos(\theta)$ for surfaces or $\Lambda p(\omega_o, \omega_i)$ for volumes) for the given incoming and outgoing directions. This function must be consistent with the value returned by the sampleKernel function.

Parameters:
[in] w_out Unit-length vector pointing away from the surface.
[in] w_in Unit-length vector used to sample incident radiance.
[in] rec HitRecord associated with point to be shaded.
[in,out] context The rendering context.
Returns:
The value of the kernel for the given directions.

Reimplemented from SurfaceShader.

double WardShader::pdfDirection const Vector3 w_out,
const Vector3 w_in,
const HitRecord rec,
Context context
const [virtual]
 

Evaluate the pdf of sampling w_in given w_out. This must be consistent with the sampleKernel function.

Parameters:
[in] w_out Unit-length vector pointing away from the surface.
[in] w_in Unit-length vector used to sample incident radiance.
[in] rec HitRecord associated with point to be shaded.
[in,out] context The rendering context.
Returns:
The evaluated value of the pdf for w_in given w_out.

Reimplemented from SurfaceShader.

rgb WardShader::sampleKernel const Vector3 w_out,
const HitRecord rec,
Context context,
Vector3 w_in,
double &  pdf
const [virtual]
 

Sample a SurfaceShader kernel.

Parameters:
[in] w_out Unit-length vector pointing away from the surface.
[in] rec HitRecord associated with the point to be shaded.
[in,out] context The rendering context.
[out] w_in Generated directional sample (unit-length vector).
[out] pdf Value of pdf for generated sample (w_in).
Returns:
The value of the kernel for the pair w_out, w_in.

Reimplemented from SurfaceShader.


The documentation for this class was generated from the following files:
Generated on Wed Jul 20 16:15:31 2005 for galileo by  doxygen 1.4.3