Redefine deprecated glTF-specific PBR material macros
Intended to support Qt5 QtQuick3D until it is ported to generic PBR macros.
This commit is contained in:
@@ -113,6 +113,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
// clang-format on
|
||||
|
||||
#include <assimp/StringUtils.h>
|
||||
#include <assimp/material.h>
|
||||
#include <assimp/GltfMaterial.h>
|
||||
|
||||
#include "AssetLib/glTF/glTFCommon.h"
|
||||
|
||||
@@ -140,7 +142,6 @@ using glTFCommon::vec4;
|
||||
|
||||
//! Magic number for GLB files
|
||||
#define AI_GLB_MAGIC_NUMBER "glTF"
|
||||
#include <assimp/pbrmaterial.h>
|
||||
|
||||
#ifdef ASSIMP_API
|
||||
#include <assimp/Compiler/pushpack1.h>
|
||||
|
||||
@@ -299,6 +299,7 @@ static aiMaterial *ImportMaterial(std::vector<int> &embeddedTexIdxs, Asset &r, M
|
||||
// glTFv2 is either PBR or Unlit
|
||||
aiShadingMode shadingMode = aiShadingMode_PBR_BRDF;
|
||||
if (mat.unlit) {
|
||||
aimat->AddProperty(&mat.unlit, 1, "$mat.gltf.unlit", 0, 0); // TODO: Remove this property, it is kept for backwards compatibility with assimp 5.0.1
|
||||
shadingMode = aiShadingMode_Unlit;
|
||||
}
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ SET( PUBLIC_HEADERS
|
||||
${HEADER_PATH}/matrix4x4.inl
|
||||
${HEADER_PATH}/mesh.h
|
||||
${HEADER_PATH}/pbrmaterial.h
|
||||
${HEADER_PATH}/GltfMaterial.h
|
||||
${HEADER_PATH}/postprocess.h
|
||||
${HEADER_PATH}/quaternion.h
|
||||
${HEADER_PATH}/quaternion.inl
|
||||
|
||||
Reference in New Issue
Block a user