Fixing the metallic simple material rendering black from obj

This commit is contained in:
samcake 2016-05-13 16:33:14 -07:00
parent fa87c68ca7
commit cdb9cb6519
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;