mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:03:53 +02:00
Merge pull request #7898 from samcake/red
Fix broken rendering for simple metallic material
This commit is contained in:
commit
b1d86c8881
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