| 688 | } |
| 689 | |
| 690 | static void LoadTransform(cgltf_texture_transform* in, TextureTransform* out) |
| 691 | { |
| 692 | // KHR_texture_transform |
| 693 | // https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_texture_transform/README.md |
| 694 | out->m_Offset[0] = in->offset[0]; |
| 695 | out->m_Offset[1] = in->offset[1]; |
| 696 | out->m_Scale[0] = in->scale[0]; |
| 697 | out->m_Scale[1] = in->scale[1]; |
| 698 | out->m_Rotation = in->rotation; |
| 699 | out->m_Texcoord = in->has_texcoord ? in->texcoord : -1; |
| 700 | } |
| 701 | |
| 702 | static void LoadTextureView(cgltf_texture_view* in, TextureView* out, dmHashTable64<void*>* cache) |
| 703 | { |