fix T61122 : Collada exporter exported alpha value (always 0) from deprecated material attribute
This commit is contained in:
@@ -98,12 +98,12 @@ void EffectsExporter::set_shader_type(COLLADASW::EffectProfile &ep, Material *ma
|
||||
|
||||
void EffectsExporter::set_transparency(COLLADASW::EffectProfile &ep, Material *ma)
|
||||
{
|
||||
if (ma->alpha == 1.0f) {
|
||||
if (ma->alpha_threshold == 1.0f) {
|
||||
return; // have no transparency
|
||||
}
|
||||
|
||||
// Tod: because we are in A_ONE mode transparency is calculated like this:
|
||||
COLLADASW::ColorOrTexture cot = getcol(1.0f, 1.0f, 1.0f, ma->alpha);
|
||||
COLLADASW::ColorOrTexture cot = getcol(1.0f, 1.0f, 1.0f, ma->alpha_threshold);
|
||||
ep.setTransparent(cot);
|
||||
ep.setOpaque(COLLADASW::EffectProfile::A_ONE);
|
||||
}
|
||||
|
||||
@@ -1358,7 +1358,7 @@ COLLADASW::ColorOrTexture bc_get_base_color(Material *ma)
|
||||
return bc_get_base_color(master_shader);
|
||||
}
|
||||
else {
|
||||
return bc_get_cot(ma->r, ma->g, ma->b, ma->alpha);
|
||||
return bc_get_cot(ma->r, ma->g, ma->b, ma->alpha_threshold);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user