From Farshid Lashkari, "The logic for handling opacity maps in the 3ds reader seems to be incorrect. It checks whether the diffuse texture contains transparency, instead of the opacity texture. If the diffuse does not contain an alpha channel it outputs the warning:
The plugin does not support images without alpha channel for opacity This seems to indicate that the check for alpha should be against the opacity map. I've attached the updated file. "
This commit is contained in:
parent
4b223c770b
commit
3722f46aff
@ -1264,10 +1264,10 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3
|
|||||||
}
|
}
|
||||||
|
|
||||||
// opacity
|
// opacity
|
||||||
osg::Texture* opacity_map = createTexture(&(mat->opacity_map),"opacity_map", textureTransparency);
|
osg::Texture2D* opacity_map = createTexture(&(mat->opacity_map),"opacity_map", textureTransparency);
|
||||||
if (opacity_map && texture1_map)
|
if (opacity_map)
|
||||||
{
|
{
|
||||||
if(texture1_map->getImage()->isImageTranslucent())
|
if(opacity_map->getImage()->isImageTranslucent())
|
||||||
{
|
{
|
||||||
transparency = true;
|
transparency = true;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user