mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:14:59 +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;
|
||||
}
|
||||
|
||||
|
||||
void fbxDebugDump(const FBXGeometry& fbxgeo) {
|
||||
qCDebug(modelformat) << "---------------- fbxGeometry ----------------";
|
||||
qCDebug(modelformat) << " hasSkeletonJoints =" << fbxgeo.hasSkeletonJoints;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue