From c545eca852d966da455b18dd57b7096daccd800b Mon Sep 17 00:00:00 2001 From: assiduous Date: Tue, 12 Jan 2021 18:52:03 -0800 Subject: GLTFLoder: added BaseColorAlphaFormat to ResourceCacheUseInfo; added Model::IsGPUDataInitialized() --- AssetLoader/interface/GLTFLoader.hpp | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'AssetLoader/interface') diff --git a/AssetLoader/interface/GLTFLoader.hpp b/AssetLoader/interface/GLTFLoader.hpp index 50a2f4d..28a34e7 100644 --- a/AssetLoader/interface/GLTFLoader.hpp +++ b/AssetLoader/interface/GLTFLoader.hpp @@ -62,11 +62,23 @@ struct ResourceCacheUseInfo Uint8 VertexBuffer0Idx = 0; Uint8 VertexBuffer1Idx = 0; - TEXTURE_FORMAT BaseColorFormat = TEX_FORMAT_RGBA8_UNORM; + /// Base color texture format. + TEXTURE_FORMAT BaseColorFormat = TEX_FORMAT_RGBA8_UNORM; + + /// Base color texture format for alpha-cut and alpha-blend materials. + TEXTURE_FORMAT BaseColorAlphaFormat = TEX_FORMAT_RGBA8_UNORM; + + /// Physical descriptor texture format. TEXTURE_FORMAT PhysicalDescFormat = TEX_FORMAT_RGBA8_UNORM; - TEXTURE_FORMAT NormalFormat = TEX_FORMAT_RGBA8_UNORM; - TEXTURE_FORMAT OcclusionFormat = TEX_FORMAT_RGBA8_UNORM; - TEXTURE_FORMAT EmissiveFormat = TEX_FORMAT_RGBA8_UNORM; + + /// Normal map format. + TEXTURE_FORMAT NormalFormat = TEX_FORMAT_RGBA8_UNORM; + + /// Occlusion texture format. + TEXTURE_FORMAT OcclusionFormat = TEX_FORMAT_RGBA8_UNORM; + + /// Emissive texture format. + TEXTURE_FORMAT EmissiveFormat = TEX_FORMAT_RGBA8_UNORM; }; struct Material @@ -412,6 +424,11 @@ struct Model void PrepareGPUResources(IRenderDevice* pDevice, IDeviceContext* pCtx); + bool IsGPUDataInitialized() const + { + return GPUDataInitialized; + } + void Transform(const float4x4& Matrix); IBuffer* GetBuffer(BUFFER_ID BuffId) -- cgit v1.2.3