Пример #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);
}
Пример #2
0
float process_holdout_tree(const OSL::ClosureColor* ci)
{
    return clamp(luminance(do_process_closure_id_tree(ci, HoldoutID)), 0.0f, 1.0f);
}
Пример #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));
}
Пример #4
0
Color3f process_background_tree(const OSL::ClosureColor* ci)
{
    return do_process_closure_id_tree(ci, BackgroundID);
}
Пример #5
0
float process_holdout_tree(const OSL::ClosureColor* ci)
{
    return saturate(luminance(do_process_closure_id_tree(ci, HoldoutID)));
}
Пример #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);
}