From db53b4ad8ffd6b60f2d3a5e9106d7c2152b6a0b6 Mon Sep 17 00:00:00 2001 From: Razakhel Date: Sun, 21 Jan 2024 15:10:44 +0100 Subject: [PATCH] [Data/GltfLoad] Fixed textures & images pairing - The texture index was wrongly assumed to be the image index, while the latter is actually the textures' source field - Fixes issue #64 --- src/RaZ/Data/GltfLoad.cpp | 52 ++++++++++++++----- src/RaZ/Render/ShaderProgram.cpp | 2 +- .../meshes/\303\247\303\273b\303\250.gltf" | 16 +++--- 3 files changed, 47 insertions(+), 23 deletions(-) diff --git a/src/RaZ/Data/GltfLoad.cpp b/src/RaZ/Data/GltfLoad.cpp index 00ed13f7..564ff01e 100644 --- a/src/RaZ/Data/GltfLoad.cpp +++ b/src/RaZ/Data/GltfLoad.cpp @@ -325,7 +325,28 @@ std::pair extractMetalnessRoughnessImages(const Image& metalRoughI return { std::move(metalnessImg), std::move(roughnessImg) }; } -void loadMaterials(const std::vector& materials, const std::vector>& images, MeshRenderer& meshRenderer) { +template