Clarisse 5.0 SP8 SDK  5.0.5.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Classes | Public Member Functions | Protected Member Functions | List of all members
PbrSssRandomWalk Class Reference
Inheritance diagram for PbrSssRandomWalk:
PbrSss PbrSurface PbrBxdf CoreScratchpadObject

Public Member Functions

void configure (const GMathVec3d &geom_normal, const GMathVec3d &shading_normal, const GMathVec3d &shading_tangent, const GMathVec3f &surface_albedo, const GMathVec3f &volume_albedo, const GMathVec3f &sigma_t, ComputeNormalCallback compute_normal_callback, void *data)
 
void set_surface_color (const GMathVec3d &incident_color, const GMathVec3d &extant_color, const ModuleTexture *extant_color_tex=0)
 
void set_anisotropy (const double &anisotropy)
 
void set_max_bounces (const unsigned int max_bounces, double russian_roulette)
 
void set_boundary (BoundaryType boundary_type, double ior=1.0)
 
virtual unsigned int get_scatter_sample_dimension () const
 Return the dimension of the variable needed to compute scattering samples.
 
virtual GMathVec3f get_lambertian_albedo (double incident_cosine) const
 
virtual bool scatter (const CtxEval &eval_ctx, CtxShader &shader_ctx, const PbrRandVar &var, PbrScatter &scatter) const
 Generate a scattering position.
 
virtual float scatter_pdf (const PbrScatter &scatter) const
 Compute the value of the PDF for a scattering position using the bxdf properties.
 
- Public Member Functions inherited from PbrSss
void configure (const GMathVec3d &geom_normal, const GMathVec3d &shading_normal, const GMathVec3f &albedo, const float &sampling_weight, ComputeNormalCallback compute_normal_callback, void *data)
 
float get_sampling_weight () const
 
void set_check_integration_domain (const bool &check_integration_domain)
 
bool check_integration_domain () const
 check_integration_domain
 
- Public Member Functions inherited from PbrSurface
void configure (const GMathVec3d &geom_normal, const GMathVec3d &shading_normal, const GMathVec3f &albedo, const float &roughness, BxDFTypeFlags type_flags, const PbrIntegrationDomain &integration_domain, const GMathVec3f &exit_color=GMathVec3f(0.0f))
 
const GMathVec3d & get_geometric_normal () const
 
- Public Member Functions inherited from PbrBxdf
void configure (const GMathVec3f &albedo, const GMathVec3d &normal, const float &roughness, BxDFTypeFlags type_flags, const PbrIntegrationDomain &integration_domain, const GMathVec3f &exit_color=GMathVec3f(0.0))
 configure Configure the bxdf
 
const GMathVec3f & get_albedo () const
 get_albedo
 
const GMathVec3d & get_normal () const
 get_normal
 
const float & get_roughness () const
 get_roughness
 
const BxDFTypeFlags & get_type_flags () const
 get_type_flags
 
const PbrIntegrationDomain & get_integration_domain () const
 get_integration_domain
 
virtual float get_sampling_weight (const GMathVec3d &wi) const
 get_sampling_weight
 
virtual float get_sampling_multiplier () const
 get_sampling_multiplier
 
virtual unsigned int get_sampling_dimension () const
 get_sampling_dimension
 
void sample (const GMathVec3d &wi, const PbrRandVar &var, const PbrScatter *scatter, PbrSample &sample) const
 Generate a sample (take in account fresnels and absorptions)
 
void evaluate (const GMathVec3d &wi, const PbrSample &sample, const PbrScatter *scatter, PbrEval &eval) const
 Compute the response of the object being hit by a sample (take in account fresnels and absorptions)
 
virtual float get_scatter_profile_scale () const
 Compute the global scale of the SSS profile.
 
virtual void sample_diff (const GMathVec3d &wi, const PbrSample &sample, const GMathVec3d &dwi, const GMathVec2d &duv, GMathVec3d &dwo) const
 Compute differentials for a given sample.
 
bool is_empty () const
 is_empty
 
bool has_any_flag (const BxDFTypeFlags &to_match) const
 has_any_flag
 
void set_fresnel (const PbrFresnel *fresnel)
 set_fresnel Set a fresnel to the bxdf
 
void set_bxdf_normalisation (const PbrBxdfNormalisation *normalisation)
 set_bxdf_normalisation Set a normalisation to the bxdf
 
void set_directional_absorption (const PbrDirectionalAbsorption *absorption)
 set_directional_absorption Set an abosrption to the bxdf
 
void set_empty ()
 set_empty Set the type of the bxdf has empty
 
const GMathVec3f & get_exit_color () const
 get_exit_color
 
const PbrFresnelget_fresnel () const
 
const PbrBxdfNormalisationget_bxdf_normalisation () const
 
const UniqueStringget_lpe_label () const
 return lpe label id associated to this bxdf
 
void set_lpe_label (const UniqueString &label)
 Set the lpe label id associated to the this bxdf.
 
- Public Member Functions inherited from CoreScratchpadObject
virtual ~CoreScratchpadObject ()
 Implement this virtual destructor in your data class, the memory scratchpad will call it on the reset call.
 

Protected Member Functions

virtual void raw_sample (const GMathVec3d &wi, const PbrRandVar &var, const PbrScatter *scatter, PbrSample &sample) const
 Generate a sample (doesn't take in account fresnels and absorptions)
 
virtual void raw_evaluate (const GMathVec3d &wi, const PbrSample &sample, const PbrScatter *scatter, PbrEval &eval) const
 Compute the response of the object being hit by a sample (doesn't take in account fresnels and absorptions)
 
virtual void normalize_scatter_result (const PbrScatter &scatter, GMathVec3f &result) const
 

Additional Inherited Members

- Public Types inherited from PbrSss
enum  BoundaryType : unsigned int
 
typedef void(* ComputeNormalCallback )(void *data, const CtxEval &eval_ctx, CtxShader &shader_ctx, GMathVec3d &normal)
 
- Static Public Attributes inherited from PbrBxdf
static const float s_min_roughness = 0.001f
 
static const float s_max_roughness = 0.999f
 
- Static Protected Member Functions inherited from PbrSss
static bool has_same_sss_group (const CtxEval &eval_ctx, GeometryIntersection &intersection, const ModuleMaterial *material)
 
static bool sss_filter_intersection_callback (const CtxEval &eval_ctx, const GeometryRaytraceCtx &ray_ctx, const unsigned int &ray_index, GeometryIntersection &intersection, GeometryRaytraceCtx::FilterData &data)
 
- Protected Attributes inherited from PbrSss
ComputeNormalCallback m_compute_normal_callback
 
void * m_compute_normal_callback_data
 
bool m_check_integration_domain
 

Member Function Documentation

virtual unsigned int PbrSssRandomWalk::get_scatter_sample_dimension ( ) const
inlinevirtual

Return the dimension of the variable needed to compute scattering samples.

Note
This controls the dimension of the variable that is given to the scatter function.

Reimplemented from PbrSss.

void PbrSssRandomWalk::raw_evaluate ( const GMathVec3d &  wi,
const PbrSample sample,
const PbrScatter scatter,
PbrEval eval 
) const
protectedvirtual

Compute the response of the object being hit by a sample (doesn't take in account fresnels and absorptions)

Parameters
widirection of the eye
samplethe sample to evaluate
scatterscattering position corresponding to the sample
evalresult of the evaluation

Reimplemented from PbrSss.

void PbrSssRandomWalk::raw_sample ( const GMathVec3d &  wi,
const PbrRandVar var,
const PbrScatter scatter,
PbrSample sample 
) const
protectedvirtual

Generate a sample (doesn't take in account fresnels and absorptions)

Parameters
widirection of the eye
varrandom variable to use to generate the sample
scatterscattering position to use
sampleresulting sample

Reimplemented from PbrSss.

bool PbrSssRandomWalk::scatter ( const CtxEval eval_ctx,
CtxShader shader_ctx,
const PbrRandVar var,
PbrScatter scatter 
) const
virtual

Generate a scattering position.

Parameters
eval_ctxa valid evaluation context
shader_ctxa valid shader context
varrandom variable to use to generate the position (its dimension is controlled by get_scatter_sample_dimension)
scatterresulting scattering position
Returns
false in case of error

Implements PbrSss.

virtual float PbrSssRandomWalk::scatter_pdf ( const PbrScatter scatter) const
inlinevirtual

Compute the value of the PDF for a scattering position using the bxdf properties.

Parameters
scatterscattering position to evaluate
Returns
the value of the PDF

Reimplemented from PbrBxdf.