Clarisse 4.0 SP5b SDK  4.0.0.0.5.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
CtxFragment Class Reference

Class containing information about the shaded fragment. More...

Public Types

enum  NormalDirection {
  DIRECTION_FRAGMENT_FRONT = 0,
  DIRECTION_FRAGMENT_BACK = 1,
  DIRECTION_EYE_FRONT = 2,
  DIRECTION_EYE_BACK = 3
}
 
enum  NormalShading {
  SHADING_FLAT = 0,
  SHADING_SMOOTH = 1
}
 

Public Member Functions

const GeometryIntersectionget_intersection () const
 Get the current fragment.
 
const
GeometryDeferredShadingGroup
get_deferred_shading_group () const
 Get the deferred shading.
 
const GMathRayget_ray () const
 Get the ray that has generated the fragment.
 
ModuleMaterialget_material () const
 Get the material to use to shade the current fragment.
 
ModuleSceneObjectget_first_scene_object () const
 Get the pointer to the first scene object in the hierarchy.
 
ModuleSceneObjectget_first_visibility_object () const
 Get the pointer to the first scene object overriding visibility or the last object if no override.
 
const GeometrySampleget_local_sample (const CtxEval &eval_ctx)
 Get the geometric information of the current fragment in the local space of the geometry.
 
const GeometrySampleget_world_sample (const CtxEval &eval_ctx)
 Get the geometric information of the current fragment in world space.
 
const GeometryDifferentialget_differentials (const CtxEval &eval_ctx) const
 Get geometry derivatives for the current fragment.
 
const GeometryMotionBlurSampleget_motion_blur_sample () const
 Get the motion blur sample for the current fragment.
 
CtxSampleget_shading_sample (const CtxEval &eval_ctx)
 Get geometric information for the shading of the current fragment.
 
const GMathVec3d & get_front_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_back_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_front_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_back_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_front_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_back_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_front_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_back_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_eye_front_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_eye_back_geometric_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_eye_front_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_eye_back_smoothed_position (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_geometric_normal (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_smoothed_normal (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_normal (const CtxEval &eval_ctx)
 
const GMathVec3d & get_shading_offset (const CtxEval &eval_ctx)
 
const GMathMatrix3x3d & get_shading_frame (const CtxEval &eval_ctx)
 
bool has_local_time () const
 Return whether a local time has to be used for the shading of the fragment.
 
double get_local_time () const
 Return the local time to use for the shading of the fragment.
 
void set_ray_ctx (const CtxRaytrace &ray_ctx, const unsigned int &ray_index)
 Set the information related to the raytracing context that has been used to generate the current fragment.
 
void set_ray (const GMathRay *ray)
 Set the ray to shade.
 
void set_intersection (const GeometryIntersection *inter)
 Set the fragment to shade.
 
void set_deferred_shading_group (const GeometryDeferredShadingGroup *group)
 Set the deferred shading group to shade.
 
void configure_normal (const NormalDirection &direction, const NormalShading &shading)
 Set the configuration for the normal.
 
void set_normal_direction (const NormalDirection &direction)
 Set the direction configuration for the normal.
 
void set_normal_shading (const NormalShading &shading)
 Set the shading configuration for the normal.
 
NormalDirection get_normal_direction () const
 Return the direction configuration for the normal.
 
NormalShading get_normal_shading () const
 Return the shading configuration for the normal.
 
void set_local_time (const double &local_time)
 Specify a local time to use for the shading of the fragment.
 
void copy (const CtxFragment &other)
 

Public Attributes

ModuleLight ** lights
 lights used for the shading of the current fragment
 
unsigned int light_count
 number of lights
 
const GasObjectlas
 acceleration structure for lights
 
unsigned int gi_bounce_id
 current bounce for the global illumination
 
unsigned int portal_bounce_id
 current bounce for portal lights
 
unsigned int sample_count
 total number of samples used for the current pixel and for the current depth
 
unsigned int sample_seed
 seed of the current sample
 
unsigned int sample_index
 index of the current sample
 
unsigned int sample_dimension
 dimension of the current sample
 
double near_clip
 near clipping plane
 
double far_clip
 far clipping plane
 
double sample_quality
 quality of the current sample (used to compute ray differentials)
 
double light_quality
 quality of the sampling for lights
 
double volume_quality
 quality of the sampling for volumes
 
GMathVec3f visibility
 shading visibility of the fragment (accumulated transparency of fragments shaded before)
 

Friends

class CtxShader
 

Detailed Description

Class containing information about the shaded fragment.

Member Function Documentation

void CtxFragment::configure_normal ( const NormalDirection &  direction,
const NormalShading &  shading 
)
inline

Set the configuration for the normal.

Parameters
directionthe direction of the normal
shadingthe shading of the normal
void CtxFragment::set_local_time ( const double &  local_time)
inline

Specify a local time to use for the shading of the fragment.

Parameters
local_timethe time to use (0 to disable it)