Helper utility function for BSDF computations. More...

#include <bsdfutils.h>

Public Member Functions

 LM_DISABLE_CONSTRUCT (BSDFUtils)
 

Static Public Member Functions

static auto ShadingNormalCorrection (const SurfaceGeometry &geom, const Vec3 &wi, const Vec3 &wo, TransportDirection transDir) -> Float
 Compute correction factor for shading normal. More...
 
static auto LocalReflect (const Vec3 &wi) -> Vec3
 Compute reflection in the local coordinates. More...
 
static auto LocalRefract (const Vec3 &wi, Float eta, Float cosThetaT) -> Vec3
 Compute refraction in the local coordinates. More...
 

Detailed Description

Helper utility function for BSDF computations.

Member Function Documentation

static auto BSDFUtils::LocalReflect ( const Vec3 wi) -> Vec3
inlinestatic

Compute reflection in the local coordinates.

Parameters
wiIncident direction in the local coordinates.
Returns
Reflected outgoing direction in the local coordinates.
static auto BSDFUtils::LocalRefract ( const Vec3 wi,
Float  eta,
Float  cosThetaT 
) -> Vec3
inlinestatic

Compute refraction in the local coordinates.

Parameters
wiIncident direction in the local coordinates.
etaIndex of refraction.
cosThetaTInner product between surface normal and the refracted vector.
Returns
Refracted outgoing direction in the local coordinates.
static auto BSDFUtils::ShadingNormalCorrection ( const SurfaceGeometry geom,
const Vec3 wi,
const Vec3 wo,
TransportDirection  transDir 
) -> Float
inlinestatic

Compute correction factor for shading normal.

Parameters
transportDirTransport direction.
geomSurface geometry.
localWiwi in local shading coordinates.
localWowo in local shading coordinates.
worldWiwi in world coordinates.
worldWowo in world coordinates.