Make grass material more bright in legacy pipeline

This commit is contained in:
Deve 2017-04-07 00:02:31 +02:00
parent 7f53faed4a
commit 724cb100e0

View File

@ -1010,6 +1010,16 @@ void Material::setMaterialProperties(video::SMaterial *m, scene::IMeshBuffer* m
if (m_shader_type == SHADERTYPE_VEGETATION)
{
m->MaterialType = video::EMT_TRANSPARENT_ALPHA_CHANNEL_REF;
// A hack that makes the grass more bright in legacy pipeline, so that
// it looks more similar to our shader-based pipeline
if (!CVS->isGLSL())
{
m->AmbientColor = video::SColor(255, 150, 150, 150);
m->DiffuseColor = video::SColor(255, 150, 150, 150);
m->EmissiveColor = video::SColor(255, 150, 150, 150);
m->SpecularColor = video::SColor(255, 150, 150, 150);
}
}
if (m_disable_z_write)