From 2d604425277f56c98a5c8351914178480f68bc23 Mon Sep 17 00:00:00 2001 From: 3gg <3gg@shellblade.net> Date: Fri, 6 Mar 2026 13:30:21 -0800 Subject: Move contrib libraries to contrib repo --- contrib/cgltf-tangents/README.md | 42 ---------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 contrib/cgltf-tangents/README.md (limited to 'contrib/cgltf-tangents/README.md') diff --git a/contrib/cgltf-tangents/README.md b/contrib/cgltf-tangents/README.md deleted file mode 100644 index 2a68b27..0000000 --- a/contrib/cgltf-tangents/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# cgltf-tangents - -A library to compute missing tangent vectors in glTF models using MikkTSpace. - -## Example - -``` -// Load the glTF scene and buffers as usual. -cgltf_result result = cgltf_parse_file(&options, filepath, &data); -cgltf_load_buffers(&options, data, filepath); - -// Compute missing tangents. -cgltfTangentBuffer* tangent_buffers = 0; -cgltf_size num_tangent_buffers = 0; -cgltf_compute_tangents(&options, data, &tangent_buffers, &num_tangent_buffers); -``` - -## About - -This is a single-header/source library that combines -[MikkTSpace](https://github.com/mmikk/MikkTSpace) and -[cgltf](https://github.com/jkuhlmann/cgltf) to compute missing tangent vectors -for models. - -Mesh primitives in glTF may have a normal map but not necessarily tangent -vectors. An example is the -[DamagedHelmet](https://github.com/KhronosGroup/glTF-Sample-Models/tree/master/2.0/DamagedHelmet/glTF) -sample. From the -[spec](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes): - -*"When tangents are not specified, client implementations SHOULD calculate -tangents using default MikkTSpace algorithms with the specified vertex -positions, normals, and texture coordinates associated with the normal texture."* - -cgltf-tangents takes an input glTF scene and scans it for mesh primitives that -have a normal map but no tangents. cgltf-tangents then invokes MikkTSpace to -compute tangents for those mesh primitives and outputs an array of tangent -buffers. The client can then upload these buffers to GPU memory for rendering. - -See `test/` for a complete example. - -MikkTSpace is packaged here for convenience. cgltf must be obtained separately. -- cgit v1.2.3