Clarisse 5.0 SP8 SDK
5.0.5.8.0
|
The PbrMediumStack class Contains all the mediums being used for one ray path, the last medium in the stack is the one that must be used to compute the transmittance for the current sample. More...
Public Member Functions | |
void | push (const GMathVec3f &attenuation, const GMathVec3f &scattering_color, const float &scattering_anisotropy, ModuleMaterial *material, const ModuleSceneObject *scene_object) |
Push a medium in the stack with his attenuation factor. | |
void | pop (ModuleMaterial *material) |
Pop the last medium in the stack. | |
bool | is_empty () const |
True when there is no medium in the stack. | |
void | clear () |
Clear the medium stack. | |
bool | update_stack (const CtxEval &eval_ctx, const CtxShader &shader_ctx, const PbrMaterial *pbr_material, const CtxFragment *old_fragment) |
update_stack Push or Pop a medium depending if the bxdf has attenuation or scattering and if the fragment is facing | |
GMathVec3f | evaluate_transmittance (const double distance) const |
evaluate_transmittance Compute the transmittance of the last medium in the stack using the distance | |
const GMathVec3f & | get_attenuation () const |
const GMathVec3f & | get_scattering_color () const |
const float & | get_scattering_anisotropy () const |
const unsigned int & | get_count () const |
ModuleMaterial * | get_material () const |
const ModuleSceneObject * | get_scene_object () const |
const PbrMedium | get_medium (const unsigned medium_id) const |
The PbrMediumStack class Contains all the mediums being used for one ray path, the last medium in the stack is the one that must be used to compute the transmittance for the current sample.
Push a Medium when the sample is BACK_DOMAIN and the fragment is facing; Pop a Medium when the sample is BACK_DOMAIN and the fragment is not facing, we pop the medium corresponding at the pushed medium
GMathVec3f PbrMediumStack::evaluate_transmittance | ( | const double | distance | ) | const |
evaluate_transmittance Compute the transmittance of the last medium in the stack using the distance
distance | is the distance travelled by the ray in the medium |
bool PbrMediumStack::update_stack | ( | const CtxEval & | eval_ctx, |
const CtxShader & | shader_ctx, | ||
const PbrMaterial * | pbr_material, | ||
const CtxFragment * | old_fragment | ||
) |
update_stack Push or Pop a medium depending if the bxdf has attenuation or scattering and if the fragment is facing