1) Changed transparency mode to use ..._REF material, which avoids the necessity
of additional changes to avoid issues with Z buffer sorting (and it is faster, too) 2) Added support for sphere maps. git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3309 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
00cec55a40
commit
13e8e2faf9
@ -120,6 +120,13 @@ void Material::install(bool is_full_path)
|
||||
void Material::setMaterialProperties(scene::IMeshBuffer *mb) const
|
||||
{
|
||||
if(m_transparency)
|
||||
mb->getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL;
|
||||
// Note: if EMT_TRANSPARENT_ALPHA_CHANNEL is used, you have to use
|
||||
// scene_manager->getParameters()->setAttribute(
|
||||
// scene::ALLOW_ZWRITE_ON_TRANSPARENT, true); and enable
|
||||
// updates of the Z buffer of the material. Since the _REF
|
||||
// approach is faster (and looks better imho), this is used for now.
|
||||
mb->getMaterial().MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
|
||||
if(m_sphere_map)
|
||||
mb->getMaterial().MaterialType = video::EMT_SPHERE_MAP;
|
||||
// FIXME: more parameters need to be set!
|
||||
} // setMaterialProperties
|
||||
|
Loading…
Reference in New Issue
Block a user