Added support for basisu extension to GLTF2 importer

pull/5308/head
Promit Roy 2023-11-03 18:44:10 -04:00
parent f844c3397d
commit 4fce9c8f1e
1 changed files with 8 additions and 0 deletions

View File

@ -1181,6 +1181,14 @@ inline void Texture::Read(Value &obj, Asset &r) {
if (Value *samplerVal = FindUInt(obj, "sampler")) { if (Value *samplerVal = FindUInt(obj, "sampler")) {
sampler = r.samplers.Retrieve(samplerVal->GetUint()); sampler = r.samplers.Retrieve(samplerVal->GetUint());
} }
if (r.extensionsUsed.KHR_texture_basisu) {
if (Value *pKHR_texture_basisu = FindExtension(obj, "KHR_texture_basisu")) {
if (Value *sourceVal = FindUInt(*pKHR_texture_basisu, "source")) {
source = r.images.Retrieve(sourceVal->GetUint());
}
}
}
} }
void Material::SetTextureProperties(Asset &r, Value *prop, TextureInfo &out) { void Material::SetTextureProperties(Asset &r, Value *prop, TextureInfo &out) {