Merge pull request #7898 from samcake/red

Fix broken rendering for simple metallic material
This commit is contained in:
Brad Hefta-Gaub 2016-05-13 17:22:36 -07:00
commit b1d86c8881
2 changed files with 1 additions and 1 deletions

View file

@ -624,7 +624,6 @@ FBXGeometry* OBJReader::readOBJ(QByteArray& model, const QVariantHash& mapping,
return geometryPtr;
}
void fbxDebugDump(const FBXGeometry& fbxgeo) {
qCDebug(modelformat) << "---------------- fbxGeometry ----------------";
qCDebug(modelformat) << " hasSkeletonJoints =" << fbxgeo.hasSkeletonJoints;

View file

@ -98,6 +98,7 @@ void Material::setFresnel(const Color& fresnel, bool isSRGB) {
}
void Material::setMetallic(float metallic) {
metallic = glm::clamp(metallic, 0.0f, 1.0f);
_key.setMetallic(metallic > 0.0f);
_schemaBuffer.edit<Schema>()._key = (uint32)_key._flags.to_ulong();
_schemaBuffer.edit<Schema>()._metallic = metallic;