This is the best solution to handle alpha + shaders with Irrlicht from SVN:
- Use standard SOLID material as a base material.
- Set SMaterial::BlendOperation to EBO_ADD;
- Set SMaterial::BlendFactor to pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
With this solution you don't need separate materialType for solid and transparent shaders, you can just change SMaterial::BlendFactor, however old solution should works too.
cube->getMaterial(0).MaterialType = video::EMT_SOLID;
cube->getMaterial(0).BlendOperation = EBO_ADD;
cube->getMaterial(0).BlendFactor = pack_textureBlendFunc(EBF_SRC_ALPHA, EBF_ONE_MINUS_SRC_ALPHA);
effect->addShadowToNode(cube, filterType, ESM_CAST);
Harch wrote:While mongoose7 is preparing an example may be someone who understands the shaders, look, why xEffects not work with a transparent material, please?
Harch wrote:Somebody repaired xEffects? What about other approaches?
irr::u32 TexVar = 0;
irr::s32 TexVar = 0;
Users browsing this forum: No registered users and 1 guest