mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-29 20:41:05 +02:00
Fixing the metallic simple material rendering black from obj
This commit is contained in:
parent
fa87c68ca7
commit
cdb9cb6519
2 changed files with 1 additions and 1 deletions
|
@ -624,7 +624,6 @@ FBXGeometry* OBJReader::readOBJ(QByteArray& model, const QVariantHash& mapping,
|
||||||
return geometryPtr;
|
return geometryPtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void fbxDebugDump(const FBXGeometry& fbxgeo) {
|
void fbxDebugDump(const FBXGeometry& fbxgeo) {
|
||||||
qCDebug(modelformat) << "---------------- fbxGeometry ----------------";
|
qCDebug(modelformat) << "---------------- fbxGeometry ----------------";
|
||||||
qCDebug(modelformat) << " hasSkeletonJoints =" << fbxgeo.hasSkeletonJoints;
|
qCDebug(modelformat) << " hasSkeletonJoints =" << fbxgeo.hasSkeletonJoints;
|
||||||
|
|
|
@ -98,6 +98,7 @@ void Material::setFresnel(const Color& fresnel, bool isSRGB) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Material::setMetallic(float metallic) {
|
void Material::setMetallic(float metallic) {
|
||||||
|
metallic = glm::clamp(metallic, 0.0f, 1.0f);
|
||||||
_key.setMetallic(metallic > 0.0f);
|
_key.setMetallic(metallic > 0.0f);
|
||||||
_schemaBuffer.edit<Schema>()._key = (uint32)_key._flags.to_ulong();
|
_schemaBuffer.edit<Schema>()._key = (uint32)_key._flags.to_ulong();
|
||||||
_schemaBuffer.edit<Schema>()._metallic = metallic;
|
_schemaBuffer.edit<Schema>()._metallic = metallic;
|
||||||
|
|
Loading…
Reference in a new issue