Improve material compat fallback + update one handwritten materials XML
This commit is contained in:
parent
106c23a09b
commit
8b8a17de21
@ -2,34 +2,22 @@
|
||||
<materials>
|
||||
<material name="banana.png"/>
|
||||
<material name="gift-box.png"/>
|
||||
<material name="gift-loop.png" sphere="Y"/>
|
||||
<material name="gold.png" light="Y" smooth-reflection="Y"/>
|
||||
<material name="silver.png" light="Y" smooth-reflection="Y"/>
|
||||
<material name="bronze.png" light="Y" smooth-reflection="Y"/>
|
||||
<material name="gift-loop.png" shader="spheremap"/>
|
||||
<material name="gold.png" light="Y" shader="spheremap"/>
|
||||
<material name="silver.png" light="Y" shader="spheremap"/>
|
||||
<material name="bronze.png" light="Y" shader="spheremap"/>
|
||||
|
||||
<material name="stk_mod_nitroBarrel.png" />
|
||||
<material name="stk_mod_nitroBottle.png" />
|
||||
<material name="stk_mod_nitroLogo.png" compositing="additive" light="N" disable-z-write="Y" />
|
||||
<material name="stk_mod_nitroLogo.png" shader="additive" disable-z-write="Y" />
|
||||
|
||||
<material name="traffic_light_green.jpg" light="N"/>
|
||||
<material name="traffic_light_yellow.jpg" light="N"/>
|
||||
<material name="traffic_light_red.jpg" light="N"/>
|
||||
<material name="traffic_light_green.jpg" shader="unlit"/>
|
||||
<material name="traffic_light_yellow.jpg" shader="unlit"/>
|
||||
<material name="traffic_light_red.jpg" shader="unlit"/>
|
||||
|
||||
<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="bubblegum_shield.png" shader="alphablend" disable-z-write="Y"/>
|
||||
<material name="bubblegum_shield_nolok.png" shader="alphablend" disable-z-write="Y"/>
|
||||
<material name="parachute.png" backface-culling="n" ignore="Y"/>
|
||||
<material name="zipper.png" light="N" zipper="Y"/>
|
||||
<material name="zipper_collect.png" light="N" zipper="Y"/>
|
||||
<material name="bowling-icon.png" transparency="Y" light="N"/>
|
||||
<material name="bubblegum-icon.png" transparency="Y" light="N"/>
|
||||
<material name="cake-icon.png" transparency="Y" light="N" />
|
||||
<material name="anchor-icon.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y"/>
|
||||
<material name="plunger-icon.png" transparency="Y" light="N"/>
|
||||
<material name="parachute-icon.png" clampU="Y" clampV="Y" ignore="Y"/>
|
||||
<material name="anchor-attach-icon.png" clampU="Y" clampV="Y" transparency="Y" light="N" ignore="Y"/>
|
||||
<material name="parachute-attach-icon.png" clampU="Y" clampV="Y" ignore="Y"/>
|
||||
<material name="bomb-attach-icon.png" clampU="Y" clampV="Y" ignore="Y"/>
|
||||
|
||||
<material name="balldimpleddark.jpg"/>
|
||||
<material name="zipper.png" shader="unlit" zipper="Y"/>
|
||||
</materials>
|
||||
|
||||
|
@ -243,6 +243,17 @@ Material::Material(const XMLNode *node, int index, bool deprecated)
|
||||
if (b)
|
||||
m_shader_type = SHADERTYPE_SPHERE_MAP;
|
||||
|
||||
|
||||
if (node->get("compositing", &s))
|
||||
{
|
||||
if (s == "blend") m_shader_type = SHADERTYPE_ALPHA_BLEND;
|
||||
else if (s == "test") m_shader_type = SHADERTYPE_ALPHA_TEST;
|
||||
else if (s == "additive") m_shader_type = SHADERTYPE_ADDITIVE;
|
||||
else if (s == "coverage") m_shader_type = SHADERTYPE_ALPHA_TEST;
|
||||
else if (s != "none")
|
||||
Log::warn("material", "Unknown compositing mode '%s'", s.c_str());
|
||||
}
|
||||
|
||||
s = "";
|
||||
node->get("graphical-effect", &s);
|
||||
|
||||
@ -322,16 +333,6 @@ Material::Material(const XMLNode *node, int index, bool deprecated)
|
||||
m_shader_type = SHADERTYPE_SPHERE_MAP;
|
||||
}
|
||||
|
||||
if (node->get("compositing", &s))
|
||||
{
|
||||
if (s == "blend") m_shader_type = SHADERTYPE_ALPHA_BLEND;
|
||||
else if (s == "test") m_shader_type = SHADERTYPE_ALPHA_TEST;
|
||||
else if (s == "additive") m_shader_type = SHADERTYPE_ADDITIVE;
|
||||
else if (s == "coverage") m_shader_type = SHADERTYPE_ALPHA_TEST;
|
||||
else if (s != "none")
|
||||
Log::warn("material", "Unknown compositing mode '%s'", s.c_str());
|
||||
}
|
||||
|
||||
bool water_shader = false;
|
||||
node->get("water-shader", &water_shader);
|
||||
if (water_shader)
|
||||
|
Loading…
x
Reference in New Issue
Block a user