obj plugin: Fix bug not using specular color (Ks) for illumination mode > 2
See paragraph "Illumination models" at http://paulbourke.net/dataformats/mtl/ for details.
This commit is contained in:
parent
199651ebbd
commit
49ad02dffe
@ -333,7 +333,7 @@ void ReaderWriterOBJ::buildMaterialToStateSetMap(obj::Model& model, MaterialToSt
|
||||
osg_material->setDiffuse(osg::Material::FRONT_AND_BACK,material.diffuse);
|
||||
osg_material->setEmission(osg::Material::FRONT_AND_BACK,material.emissive);
|
||||
|
||||
if (material.illum == 2) {
|
||||
if (material.illum >= 2) {
|
||||
osg_material->setSpecular(osg::Material::FRONT_AND_BACK,material.specular);
|
||||
} else {
|
||||
osg_material->setSpecular(osg::Material::FRONT_AND_BACK, osg::Vec4(0,0,0,1));
|
||||
|
Loading…
Reference in New Issue
Block a user