Fix objects that are unaffected by lights

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14697 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2013-12-11 00:37:07 +00:00
parent 08299c6e58
commit b27a5363bd
2 changed files with 14 additions and 0 deletions

View File

@ -11,6 +11,10 @@
<material name="stk_mod_nitroBottle.png" />
<material name="stk_mod_nitroLogo.png" compositing="additive" light="N" disable-z-write="Y" />
<material name="traffic_light_green.jpg" light="N"/>
<material name="traffic_light_yellowjpg" light="N"/>
<material name="traffic_light_red.jpg" light="N"/>
<material name="bubblegum_shield.png" compositing="blend" disable-z-write="Y"/>
<material name="bubblegum_shield_nolok.png" compositing="blend" disable-z-write="Y"/>
<material name="parachute.png" backface-culling="n" ignore="Y"/>

View File

@ -645,6 +645,16 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
}
if (!m_lighting && irr_driver->isGLSL())
{
// we abuse alpha blender a little here : in the shader-based pipeline,
// transparent objects are rendered after lighting has been applied.
// Therefore, pretending the object is transparent will have the effect
// of making it unaffected by lights
m_alpha_blending = true;
m_disable_z_write = false;
}
int modes = 0;
if (m_alpha_testing)