From fa87c68ca7056f4409b33bed7ebd15d92d5424b0 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 13 May 2016 01:08:25 -0700 Subject: [PATCH 1/3] INtroducing the TransformBuffer --- libraries/gpu/src/gpu/Transform.h | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 libraries/gpu/src/gpu/Transform.h diff --git a/libraries/gpu/src/gpu/Transform.h b/libraries/gpu/src/gpu/Transform.h new file mode 100644 index 0000000000..82974964a8 --- /dev/null +++ b/libraries/gpu/src/gpu/Transform.h @@ -0,0 +1,36 @@ +// +// Transform.h +// libraries/gpu/src/gpu +// +// Created by Sam Gateau on 06/12/2016. +// Copyright 2014 High Fidelity, Inc. +// +// Distributed under the Apache License, Version 2.0. +// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html +// +#ifndef hifi_gpu_Transform_h +#define hifi_gpu_Transform_h + +#include + +#include + +#include "Resource.h" + +namespace gpu { + +class TransformBuffer { +public: + + TransformBuffer() {} + ~TransformBuffer() {} + +protected: + BufferPointer _buffer; +}; +typedef std::shared_ptr TransformBufferPointer; + +}; + + +#endif From cdb9cb651904feee965cd23e52cc8b8fd52649c0 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 13 May 2016 16:33:14 -0700 Subject: [PATCH 2/3] Fixing the metallic simple material rendering black from obj --- libraries/fbx/src/OBJReader.cpp | 1 - libraries/model/src/model/Material.cpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/fbx/src/OBJReader.cpp b/libraries/fbx/src/OBJReader.cpp index aa8edc3f68..38121555ed 100644 --- a/libraries/fbx/src/OBJReader.cpp +++ b/libraries/fbx/src/OBJReader.cpp @@ -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; diff --git a/libraries/model/src/model/Material.cpp b/libraries/model/src/model/Material.cpp index ba61732237..53478be536 100755 --- a/libraries/model/src/model/Material.cpp +++ b/libraries/model/src/model/Material.cpp @@ -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()._key = (uint32)_key._flags.to_ulong(); _schemaBuffer.edit()._metallic = metallic; From 96dffad0d341987e685f9270f3faf0cf55291894 Mon Sep 17 00:00:00 2001 From: samcake Date: Fri, 13 May 2016 16:35:15 -0700 Subject: [PATCH 3/3] Fixing the metallic simple material rendering black from obj --- libraries/gpu/src/gpu/Transform.h | 36 ------------------------------- 1 file changed, 36 deletions(-) delete mode 100644 libraries/gpu/src/gpu/Transform.h diff --git a/libraries/gpu/src/gpu/Transform.h b/libraries/gpu/src/gpu/Transform.h deleted file mode 100644 index 82974964a8..0000000000 --- a/libraries/gpu/src/gpu/Transform.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// Transform.h -// libraries/gpu/src/gpu -// -// Created by Sam Gateau on 06/12/2016. -// Copyright 2014 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// -#ifndef hifi_gpu_Transform_h -#define hifi_gpu_Transform_h - -#include - -#include - -#include "Resource.h" - -namespace gpu { - -class TransformBuffer { -public: - - TransformBuffer() {} - ~TransformBuffer() {} - -protected: - BufferPointer _buffer; -}; -typedef std::shared_ptr TransformBufferPointer; - -}; - - -#endif