{"id":19817146,"url":"https://github.com/nvpro-samples/nvtt_samples","last_synced_at":"2025-04-12T12:24:03.679Z","repository":{"id":86083460,"uuid":"426174966","full_name":"nvpro-samples/nvtt_samples","owner":"nvpro-samples","description":"NVIDIA Texture Tools samples for compression, image processing, and decompression.","archived":false,"fork":false,"pushed_at":"2025-03-18T00:42:44.000Z","size":1686,"stargazers_count":76,"open_issues_count":0,"forks_count":7,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-03-26T07:06:16.038Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nvpro-samples.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-09T09:55:55.000Z","updated_at":"2025-03-26T06:45:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f0e3388-48b9-4a0a-ba05-f76c0f526994","html_url":"https://github.com/nvpro-samples/nvtt_samples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvpro-samples%2Fnvtt_samples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvpro-samples%2Fnvtt_samples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvpro-samples%2Fnvtt_samples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvpro-samples%2Fnvtt_samples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvpro-samples","download_url":"https://codeload.github.com/nvpro-samples/nvtt_samples/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248565533,"owners_count":21125513,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T10:11:49.651Z","updated_at":"2025-04-12T12:24:03.648Z","avatar_url":"https://github.com/nvpro-samples.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NVTT 3 Samples\n\nThis repository contains a number of samples showing how to use [NVTT 3](https://developer.nvidia.com/gpu-accelerated-texture-compression), a GPU-accelerated texture compression and image processing library.\n\nThis includes several small samples intended as tutorials:\n\n* [**mini_bc7**](mini_bc7) shows how to load an image and turn it into a one-mipmap DDS file using BC7 block compression. It's small enough that it can be rewritten in 250 characters (without error checking):\n\n```c++\n#include\u003cnvtt/nvtt.h\u003e\nint main(int n,char**v){if(n==3){nvtt::Surface i;i.load(v[1]);nvtt::Context c(1);nvtt::CompressionOptions o;o.setFormat(nvtt::Format_BC7);nvtt::OutputOptions p;p.setFileName(v[2]);c.outputHeader(i,1,o,p);c.compress(i,0,0,o,p);}}\n```\n\n* [**mipmap**](mipmap) shows how to generate mipmaps from an image, and describes linear-space filtering and premultiplied alpha.\n* [**cuda_input**](cuda_input) shows how to use NVTT 3's low-level `GPUInputBuffer` API to compress a texture directly from a GPU buffer. This API accelerates compression by avoiding CPU-GPU data transfers.\n* [**c_wrapper_demo**](c_wrapper_demo) shows how to use NVTT 3's C wrapper, which allows other compilers and programming languages to use NVTT 3. It covers the high-level and low-level APIs.\n* [**to_slope_space**](to_slope_space) shows how to use `nvtt::Surface::channel()`. It converts a normal map to a slope-space BC5 normal map.\n\nThis also includes the source code for several tools from NVTT 3 ported to use the nvpro-samples framework, which show how to use almost all of the functionality in NVTT 3:\n\n* [**compress**](compress) is a general command-line tool for compressing images to DDS files, and uses similar flags as the [Texture Tools Exporter's](https://developer.nvidia.com/nvidia-texture-tools-exporter) command-line interface. It supports many types of images, including normal maps. It can also compress multiple files at once (the batchCompress tool was merged into it in June 2023)\n* [**decompress**](decompress) decompresses DDS files to other formats.\n* [**imgdiff**](imgdiff) reports error metrics between image files.\n\nFor comprehensive API documentation, please see the `docs/` folder in the NVTT 3 distribution.\n\n## Build Instructions\n\nTo build these samples, you'll need the [NVTT 3 SDK](https://developer.nvidia.com/gpu-accelerated-texture-compression). For `cuda_input`, you'll also need the [CUDA Toolkit](https://developer.nvidia.com/cuda-downloads). Then do one of the following:\n\n- To clone all NVIDIA DesignWorks Samples, clone https://github.com/nvpro-samples/build_all, then run one of the `clone_all` scripts in that directory.\n- Or to get the files for this sample without the other samples, clone this repository as well as https://github.com/nvpro-samples/nvpro_core into a single directory.\n\nYou can then use [CMake](https://cmake.org/) to generate and subsequently build the project.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvpro-samples%2Fnvtt_samples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvpro-samples%2Fnvtt_samples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvpro-samples%2Fnvtt_samples/lists"}