Base class for BSDFs.
More...
#include <materials.h>
|
| Bsdf (Type ty) |
|
Type | type () const |
| Returns the type of the BSDF, useful to make sampling decisions.
|
|
virtual rgb | eval (const float3 &, const SurfaceParams &, const float3 &) const |
| Evaluates the material for the given pair of directions and surface point. Does NOT include the cosine term.
|
|
virtual BsdfSample | sample (Sampler &, const SurfaceParams &surf, const float3 &, bool=false) const |
| Samples the material given a surface point and an outgoing direction. The contribution DOES include the cosine term.
|
|
virtual float | pdf (const float3 &, const SurfaceParams &, const float3 &) const |
| Returns the probability to sample the given input direction (sampled using the sample function).
|
|
◆ Type
Classification of BSDF shapes.
Enumerator |
---|
Diffuse | Mostly diffuse, i.e no major features, mostly uniform.
|
Glossy | Mostly glossy, i.e hard for Photon Mapping.
|
Specular | Purely specular, i.e merging/connections are not possible.
|
◆ make_sample()
template<bool below_surface = false>
Utility function to create a MaterialSample. It prevents corner cases that will cause issues (zero pdf, direction parallel/under the surface). When below_surface is true, it expects the direction to be under the surface, otherwise above.
The documentation for this class was generated from the following file: