diff --git a/interface/src/renderer/Model.cpp b/interface/src/renderer/Model.cpp index ddcdfe3a84..e6dc3ce74e 100644 --- a/interface/src/renderer/Model.cpp +++ b/interface/src/renderer/Model.cpp @@ -2347,8 +2347,12 @@ int Model::renderMeshesFromList(QVector& list, gpu::Batch& batch, RenderMod diffuseMap = (_dilatedTextures[i][j] = static_cast(diffuseMap)->getDilatedTexture(_pupilDilation)).data(); } - GLBATCH(glBindTexture)(GL_TEXTURE_2D, !diffuseMap ? - Application::getInstance()->getTextureCache()->getWhiteTextureID() : diffuseMap->getID()); + static bool showDiffuse = true; + if (showDiffuse && diffuseMap) { + GLBATCH(glBindTexture)(GL_TEXTURE_2D, diffuseMap->getID()); + } else { + GLBATCH(glBindTexture)(GL_TEXTURE_2D, Application::getInstance()->getTextureCache()->getWhiteTextureID()); + } if (locations->texcoordMatrices >= 0) { glm::mat4 texcoordTransform[2]; @@ -2379,7 +2383,11 @@ int Model::renderMeshesFromList(QVector& list, gpu::Batch& batch, RenderMod if (locations->emissiveTextureUnit >= 0) { assert(locations->emissiveParams >= 0); // we should have the emissiveParams defined in the shader - GLBATCH(glUniform2f)(locations->emissiveParams, 0.1f, 4.0f); + static float emissiveOffset = 0.1f; + static float emissiveScale = 1.0f; + //GLBATCH(glUniform2f)(locations->emissiveParams, 0.1f, 4.0f); + GLBATCH(glUniform2f)(locations->emissiveParams, emissiveOffset, emissiveScale); + GLBATCH(glActiveTexture)(GL_TEXTURE0 + locations->emissiveTextureUnit); Texture* emissiveMap = networkPart.emissiveTexture.data(); diff --git a/libraries/fbx/src/FBXReader.cpp b/libraries/fbx/src/FBXReader.cpp index 0cebacf51a..b54abedc33 100644 --- a/libraries/fbx/src/FBXReader.cpp +++ b/libraries/fbx/src/FBXReader.cpp @@ -1597,9 +1597,28 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping) } else if (property.properties.at(0) == "Opacity") { material.opacity = property.properties.at(index).value(); } +#if defined(DEBUG_FBXREADER) + else { + const std::string propname = property.properties.at(0).toString().toStdString(); + if (propname == "EmissiveFactor") { + } + } +#endif } } } +#if defined(DEBUG_FBXREADER) + else { + std::string propname = subobject.name.data(); + int unknown = 0; + if ( (propname == "Version") + ||(propname == "ShadingModel") + ||(propname == "Multilayer")) { + } else { + unknown++; + } + } +#endif } material.id = getID(object.properties); materials.insert(material.id, material); @@ -1687,7 +1706,10 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping) } else if (type.contains("emissive")) { emissiveTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1)); + } else if (type.contains("ambient")) { + emissiveTextures.insert(getID(connection.properties, 2), getID(connection.properties, 1)); } else { + std::string typenam = type.data(); counter++; } }