NVIDIA Texture Tools samples for compression, image processing, and decompression.

Overview

NVTT 3 Samples

This repository contains a number of samples showing how to use NVTT 3, a GPU-accelerated texture compression and image processing library.

This includes several small samples intended as tutorials:

  • 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):
#include<nvtt/nvtt.h>
int 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);}}
  • mipmap shows how to generate mipmaps from an image, and describes linear-space filtering and premultiplied alpha.
  • 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.
  • 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.

This 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:

  • compress is a general command-line tool for compressing images to DDS files, and uses similar flags as the Texture Tools Exporter's command-line interface. It supports many types of images, including normal maps.
  • batchCompress can be used to compress multiple files at once.
  • decompress decompresses DDS files to other formats.
  • imgdiff reports error metrics between image files.

For comprehensive API documentation, please see the docs/ folder in the NVTT 3 distribution.

Build Instructions

To build these samples, you'll need the NVTT 3 SDK. For cuda_input, you'll also need the CUDA Toolkit. Then do one of the following:

You can then use CMake to generate and subsequently build the project.

You might also like...
GPU Texture Baking Tool

fornos GPU Texture Baking Tool A fast and simple tool to bake your high-poly mesh details to textures. Bakers Height Position Normals Ambient Occlusio

Docker files and scripts to setup and run VINS-FUSION-gpu on NVIDIA jetson boards inside a docker container.

jetson_vins_fusion_docker This repository provides Docker files and scripts to easily setup and run VINS-FUSION-gpu on NVIDIA jetson boards inside a d

A project demonstrating how to train your own gesture recognition deep learning pipeline. We start with a pre-trained detection model, repurpose it for hand detection using Transfer Learning Toolkit 3.0, and use it together with the purpose-built gesture recognition model. Once trained, we deploy this model on NVIDIA® Jetson™ using Deepstream SDK. Hardware-accelerated DNN model inference ROS2 packages using NVIDIA Triton/TensorRT for both Jetson and x86_64 with CUDA-capable GPU.
Hardware-accelerated DNN model inference ROS2 packages using NVIDIA Triton/TensorRT for both Jetson and x86_64 with CUDA-capable GPU.

Isaac ROS DNN Inference Overview This repository provides two NVIDIA GPU-accelerated ROS2 nodes that perform deep learning inference using custom mode

Visual odometry package based on hardware-accelerated NVIDIA Elbrus library with world class quality and performance.
Visual odometry package based on hardware-accelerated NVIDIA Elbrus library with world class quality and performance.

Isaac ROS Visual Odometry This repository provides a ROS2 package that estimates stereo visual inertial odometry using the Isaac Elbrus GPU-accelerate

The core engine forked from NVidia's Q2RTX. Heavily modified and extended to allow for a nicer experience all-round.

Nail & Crescent - Development Branch Scratchpad - Things to do or not forget: Items are obviously broken. Physics.cpp needs more work, revising. Proba

Vendor and game agnostic latency reduction middleware. An alternative to NVIDIA Reflex.

LatencyFleX (LFX) Vendor and game agnostic latency reduction middleware. An alternative to NVIDIA Reflex. Why LatencyFleX? There is a phenomenon commo

TensorRT is a C++ library for high performance inference on NVIDIA GPUs and deep learning accelerators.

TensorRT Open Source Software This repository contains the Open Source Software (OSS) components of NVIDIA TensorRT. Included are the sources for Tens

GPU Cloth TOP in TouchDesigner using CUDA-enabled NVIDIA Flex
GPU Cloth TOP in TouchDesigner using CUDA-enabled NVIDIA Flex

This project demonstrates how to use NVIDIA FleX for GPU cloth simulation in a TouchDesigner Custom Operator. It also shows how to render dynamic meshes from the texture data using custom PBR GLSL material shaders inside TouchDesigner.

Comments
  • In file nvtt_samples/compress/compress.cpp std::path is used wrongly

    In file nvtt_samples/compress/compress.cpp std::path is used wrongly

    In file nvtt_samples/compress/compress.cpp std::path is used wrongly

    See line 410 output = input.replace_extension("dds");

    replace_extension modifies the @input and as a result the program doesn't work with non-explicit output file:

    Replacing the line with: output = input; output.replace_extension("dds");

    fixes the issue

    opened by ongamex 0
Owner
NVIDIA DesignWorks Samples
NVIDIA DesignWorks Samples
NVIDIA Image Scaling SDK

NVIDIA Image Scaling SDK v1.0 The MIT License(MIT) Copyright(c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved. Permission is hereby grante

NVIDIA GameWorks 387 Nov 27, 2022
Super Mario Remake using C++, SFML, and Image Processing which was a project for Structure Programming Course, 1st Year

Super Mario Remake We use : C++ in OOP concepts SFML for game animations and sound effects. Image processing (Tensorflow and openCV) to add additional

Omar Elshopky 4 Sep 28, 2022
Insight Toolkit (ITK) is an open-source, cross-platform toolkit for N-dimensional scientific image processing, segmentation, and registration

ITK: The Insight Toolkit C++ Python Linux macOS Windows Linux (Code coverage) Links Homepage Download Discussion Software Guide Help Examples Issue tr

Insight Software Consortium 1.1k Nov 24, 2022
An open source iOS framework for GPU-based image and video processing

GPUImage Brad Larson http://www.sunsetlakesoftware.com @bradlarson [email protected] Overview The GPUImage framework is a BSD-licensed iO

Brad Larson 20k Nov 25, 2022
A easy-to-use image processing library accelerated with CUDA on GPU.

gpucv Have you used OpenCV on your CPU, and wanted to run it on GPU. Did you try installing OpenCV and get frustrated with its installation. Fret not

shrikumaran pb 4 Aug 14, 2021
cudnn_frontend provides a c++ wrapper for the cudnn backend API and samples on how to use it

cuDNN Frontend API Introduction The cuDNN Frontend API is a C++ header-only library that demonstrates how to use the cuDNN C backend API. The cuDNN C

NVIDIA Corporation 123 Dec 1, 2022
Simple samples for TensorRT programming

Introduction This is a collection of simplified TensorRT samples to get you started with TensorRT programming. Most of the samples are written in C++,

NVIDIA Corporation 637 Nov 26, 2022
TensorFlow Lite, Coral Edge TPU samples (Python/C++, Raspberry Pi/Windows/Linux).

TensorFlow Lite, Coral Edge TPU samples (Python/C++, Raspberry Pi/Windows/Linux).

Nobuo Tsukamoto 87 Nov 16, 2022
AI-related samples made available by the DevTech ProViz team

ProViz-AI Samples This repository is a collection of AI-related samples, developed and provided by the DevTech ProViz team. Each folder in the reposit

NVIDIA Corporation 7 Nov 18, 2022
RDO BC1-7 GPU texture encoders

bc7enc - Fast BC1-7 GPU texture encoders with Rate Distortion Optimization (RDO) This repo contains fast texture encoders for BC1-7. All formats suppo

Rich Geldreich 107 Nov 28, 2022