Beispiel #1
0
double process_transparency_tree(const OSL::ClosureColor* ci)
{
    double transp = luminance(do_process_closure_id_tree(ci, TransparentID));
    // Convert from transparency to opacity.
    return 1.0 - clamp(transp, 0.0, 1.0);
}
Beispiel #2
0
float process_holdout_tree(const OSL::ClosureColor* ci)
{
    return clamp(luminance(do_process_closure_id_tree(ci, HoldoutID)), 0.0f, 1.0f);
}
Beispiel #3
0
void process_transparency_tree(const OSL::ClosureColor* ci, Alpha& alpha)
{
    // Convert from transparency to opacity.
    float transp = luminance(do_process_closure_id_tree(ci, TransparentID));
    alpha.set(1.0f - clamp(transp, 0.0f, 1.0f));
}
Beispiel #4
0
Color3f process_background_tree(const OSL::ClosureColor* ci)
{
    return do_process_closure_id_tree(ci, BackgroundID);
}
Beispiel #5
0
float process_holdout_tree(const OSL::ClosureColor* ci)
{
    return saturate(luminance(do_process_closure_id_tree(ci, HoldoutID)));
}
Beispiel #6
0
void process_transparency_tree(const OSL::ClosureColor* ci, Alpha& alpha)
{
    // Convert from transparency to opacity.
    const float transparency = saturate(luminance(do_process_closure_id_tree(ci, TransparentID)));
    alpha.set(1.0f - transparency);
}