Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
PbrBxdfHelpers Class Reference

Public Member Functions

 IX_DEPRECATED_UNTIL ("This function is deprecated: use GMathFresnel::reflect(...) and PbrBxdfHelpers::clip(...) instead.", 6) static inline void compute_reflection_ray(const GMathVec3d &sn
 
 clip (direction, gn)
 
 IX_DEPRECATED_UNTIL ("This function is deprecated: use GMathFresnel::refract(...) and PbrBxdfHelpers::clip(...) instead.", 6) static inline double compute_refraction_ray(const GMathVec3d &eye_direction
 
 clip (direction,-gn)
 

Static Public Member Functions

static void clip (GMathVec3d &direction, const GMathVec3d &clip_plane_normal)
 
static void clip (GMathVec3d &direction, const GMathVec3d &clip_cone_normal, const double &cos_angle)
 
static double reflect (const GMathVec3d &i, const GMathVec3d &n, GMathVec3d &r)
 
static void compute_reflection_ray_differential (const GMathVec3d &wi, const GMathVec3d &wo, const GMathVec3d &dwi, const GMathVec2d &duv, const GMathVec3d &sn, const GMathVec3d &dndu, const GMathVec3d &dndv, GMathVec3d &dwo)
 
static double compute_reflection_ray_microfacet (const GMathVec3d &sn, const GMathVec3d &eye_direction, GMathVec3d &direction)
 
static double refract (const GMathVec3d &i, const GMathVec3d &n, const double &ior, GMathVec3d &t)
 
template<typename REAL >
static bool get_local_refraction_direction (REAL ior, const GMathVec3< REAL > &wi, GMathVec3< REAL > &wo)
 
template<typename REAL >
static bool get_refraction_direction (const GMathVec3< REAL > &wi, const GMathVec3< REAL > &normal, const REAL &ior, REAL &eta_i, REAL &eta_o, REAL &cos_t, GMathVec3< REAL > &wo)
 
static void compute_refraction_differential (const GMathVec3d &wi, const GMathVec3d &wo, const GMathVec3d &dwi, const GMathVec2d &duv, const double &eta, const GMathVec3d &n, const GMathVec3d &dndu, const GMathVec3d &dndv, GMathVec3d &dwo)
 
static double compute_refraction_ray_microfacet (const GMathVec3d &eye_direction, const double &ior, const GMathVec3d &sn, GMathVec3d &direction)
 
template<typename REAL >
static void compute_iors (const REAL cos_theta_o, const REAL ior, REAL &eta_i, REAL &eta_o)
 compute_iors Compute the eta_o and eta_i according if we are exiting or coming in the surface
 
template<bool IS_LOCAL, typename REAL >
static GMathVec3< REAL > compute_microfacet_refraction_normal (const REAL eta_i, const REAL eta_o, const GMathVec3< REAL > &wi, const GMathVec3< REAL > &wo, const GMathVec3< REAL > &normal=GMathVec3< REAL >(GMath< REAL >::zero()))
 compute_microfacet_refraction_normal Retreive the normal used for the transmission
 
template<typename REAL >
static void compute_sampling_cosine_weighted_direction_ray (const GMathVec2< REAL > &samples, const GMathVec3< REAL > &normal, GMathVec3< REAL > &direction)
 
static void compute_sampling_sphere_uniform_direction_ray (const GMathVec2d &samples, GMathVec3d &direction)
 
template<typename REAL >
static void sample_quadrant (REAL u, REAL v, REAL ab_x, REAL ab_y, REAL &rcp_eff_ab_xy, REAL &tan_theta_2, REAL &cos_theta_2, GMathVec3< REAL > &h_local)
 
static double compute_position_bias (const GMathVec3d &pos, double min_bias=0.0)
 
static void compute_shading_positions (const GeometrySample &sample, GMathVec3d &front_position, GMathVec3d &back_position, double min_bias=0.0, double smoothing=1.0)
 
static GMathVec3d compute_shading_front_position (const GeometrySample &sample, double min_bias=0.0, double smoothing=1.0)
 
static GMathVec3d compute_shading_back_position (const GeometrySample &sample, double min_bias=0.0, double smoothing=1.0)
 

Public Attributes

const GMathVec3d & gn
 
const GMathVec3d const GMathVec3d & eye_direction
 
const GMathVec3d const
GMathVec3d GMathVec3d & 
direction
 
const double & ior
 
const double const GMathVec3d & gn
 
const double const GMathVec3d
const GMathVec3d & 
sn
 
const double const GMathVec3d
const GMathVec3d GMathVec3d & 
direction
 
return cos_t
 

Member Function Documentation

template<typename REAL >
static bool PbrBxdfHelpers::get_local_refraction_direction ( REAL  ior,
const GMathVec3< REAL > &  wi,
GMathVec3< REAL > &  wo 
)
inlinestatic

Computes the refracted direction at a dielectric boundary given the incoming direction (wi) and the relative ior (eta). The outgoing direction is stored in wo. The incoming direction is assumed to be in a local, tangent space, whose ONB is based on the normal (hence, the normal is [0,0,1]).

Member Data Documentation

const GMathVec3d const GMathVec3d GMathVec3d& PbrBxdfHelpers::direction
Initial value:
{
GMathFresnel::reflect(eye_direction, sn, direction)
const double const GMathVec3d const GMathVec3d GMathVec3d& PbrBxdfHelpers::direction
Initial value:
{
const double cos_t = GMathFresnel::refract(eye_direction, sn, 1.0 / ior, direction)