From 6465b9ade8d8e7b2b9627a1a5b60bb9fa786c592 Mon Sep 17 00:00:00 2001 From: hzzengxiaoqi Date: Fri, 7 Jan 2022 11:50:10 +0800 Subject: [PATCH] fix bug of GLTFIO_LITE, the macro GLTFRESOURCES_LITE_LIT_BLEND_DATA is not defined anywhere, it should be GLTFRESOURCES_LITE_LIT_FADE_DATA. This solves the issue of rendering transparent objects using GLTFIO_LITE macro, i.e. using gltfresources_lite.bin. If not change this macro, the transparent objects will be rended using LIT_OPAQUE material instead of LIT_FADE material. --- libs/gltfio/src/UbershaderLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/gltfio/src/UbershaderLoader.cpp b/libs/gltfio/src/UbershaderLoader.cpp index c7874462c1..b9323b2b88 100644 --- a/libs/gltfio/src/UbershaderLoader.cpp +++ b/libs/gltfio/src/UbershaderLoader.cpp @@ -131,7 +131,7 @@ Material* UbershaderLoader::getMaterial(const MaterialKey& config) const { case MATINDEX(LIT, AlphaMode::OPAQUE, false, false, false): mMaterials[matindex] = CREATE_MATERIAL(LIT_OPAQUE); break; #endif - #if !GLTFIO_LITE || defined(GLTFRESOURCES_LITE_LIT_BLEND_DATA) + #if !GLTFIO_LITE || defined(GLTFRESOURCES_LITE_LIT_FADE_DATA) case MATINDEX(LIT, AlphaMode::BLEND, false, false, false): mMaterials[matindex] = CREATE_MATERIAL(LIT_FADE); break; #endif