Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 24, 2016, 11:28:05 PM (9 years ago)
Author:
landauf
Message:

simplified transparency-check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/GlowMaterialListener.h

    r11089 r11095  
    3232                {
    3333                    // try to figure out if the original material is transparent. if yes, use a black transparent material, otherwise a black opaque one.
    34                     if (mat != nullptr && mat->getTechnique(0) != nullptr && mat->getTechnique(0)->getPass(0) != nullptr)
    35                     {
    36                         Ogre::Pass* pass = mat->getTechnique(0)->getPass(0);
    37                         if (pass->getDepthWriteEnabled())
    38                             return mBlackMat->getTechnique(0);
    39                         else
    40                             return mTransparentMat->getTechnique(0);
    41                     }
     34                    if (mat->isTransparent())
     35                        return mTransparentMat->getTechnique(0);
    4236                    else
    4337                        return mBlackMat->getTechnique(0);
Note: See TracChangeset for help on using the changeset viewer.