Handle a case that advanced lighting is disabled in graphics restrictions.
This commit is contained in:
parent
803eba5d5c
commit
bf64459458
@ -76,7 +76,7 @@ Material::Material(const XMLNode *node, bool deprecated)
|
|||||||
init();
|
init();
|
||||||
|
|
||||||
bool b = false;
|
bool b = false;
|
||||||
|
|
||||||
node->get("clampu", &b); if (b) m_clamp_tex |= UCLAMP; //blender 2.4 style
|
node->get("clampu", &b); if (b) m_clamp_tex |= UCLAMP; //blender 2.4 style
|
||||||
node->get("clampU", &b); if (b) m_clamp_tex |= UCLAMP; //blender 2.5 style
|
node->get("clampU", &b); if (b) m_clamp_tex |= UCLAMP; //blender 2.5 style
|
||||||
b = false;
|
b = false;
|
||||||
@ -745,7 +745,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
|
|||||||
ITexture *tex;
|
ITexture *tex;
|
||||||
ITexture *glossytex;
|
ITexture *glossytex;
|
||||||
STKTexManager* stm = STKTexManager::getInstance();
|
STKTexManager* stm = STKTexManager::getInstance();
|
||||||
if (m_gloss_map.size() > 0 && UserConfigParams::m_dynamic_lights)
|
if (m_gloss_map.size() > 0 && CVS->isDefferedEnabled())
|
||||||
{
|
{
|
||||||
glossytex = stm->getTexture(m_gloss_map, false/*srgb*/,
|
glossytex = stm->getTexture(m_gloss_map, false/*srgb*/,
|
||||||
false/*premul_alpha*/, false/*set_material*/,
|
false/*premul_alpha*/, false/*set_material*/,
|
||||||
@ -886,7 +886,7 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
|
|||||||
|
|
||||||
if (m_normal_map_tex.size() > 0)
|
if (m_normal_map_tex.size() > 0)
|
||||||
{
|
{
|
||||||
if (UserConfigParams::m_dynamic_lights)
|
if (CVS->isDefferedEnabled())
|
||||||
{
|
{
|
||||||
tex = stm->getTexture(m_normal_map_tex, false/*srgb*/,
|
tex = stm->getTexture(m_normal_map_tex, false/*srgb*/,
|
||||||
false/*premul_alpha*/, false/*set_material*/,
|
false/*premul_alpha*/, false/*set_material*/,
|
||||||
|
@ -237,7 +237,7 @@ void Referee::selectReadySetGo(int rsg)
|
|||||||
return;
|
return;
|
||||||
video::SMaterial &m = m_scene_node->getMaterial(m_st_traffic_buffer); // m_scene_node->getMesh()->getMeshBuffer(m_st_traffic_buffer)->getMaterial();
|
video::SMaterial &m = m_scene_node->getMaterial(m_st_traffic_buffer); // m_scene_node->getMesh()->getMeshBuffer(m_st_traffic_buffer)->getMaterial();
|
||||||
|
|
||||||
//if (irr_driver->isGLSL() && UserConfigParams::m_dynamic_lights)
|
//if (irr_driver->isGLSL() && CVS->isDefferedEnabled())
|
||||||
// m.MaterialType = irr_driver->getShader(ES_OBJECT_UNLIT);
|
// m.MaterialType = irr_driver->getShader(ES_OBJECT_UNLIT);
|
||||||
|
|
||||||
core::matrix4* matrix = &m.getTextureMatrix(0);
|
core::matrix4* matrix = &m.getTextureMatrix(0);
|
||||||
|
Loading…
Reference in New Issue
Block a user