nvdiffrast
v0.3.3High-performance modular differentiable rasterization primitives from NVIDIA Research for 3D deep learning
Development Activity
Sample Renders
Overview
Best for
Researchers who need maximum-performance differentiable rasterization primitives and want full control over the rendering pipeline, particularly for large-scale 3D reconstruction, inverse rendering, and generative 3D model training
Not ideal for
Users who want a turnkey differentiable renderer with built-in shading and materials — PyTorch3D or NVIDIA Kaolin provide a higher-level experience with less pipeline engineering
Strengths
- Extremely high throughput through custom CUDA kernels with OpenGL/Vulkan hardware rasterization interop, achieving rendering speeds suitable for training loops with millions of optimization iterations
- Modular primitive-based design — rasterize, interpolate, texture, and anti-alias operations are independent differentiable blocks that researchers compose into precisely the pipeline they need, without overhead from unused features
- Principled differentiable anti-aliasing that analytically handles edge discontinuities, producing correct silhouette gradients where naive differentiable rasterizers fail or produce zero-gradient artifacts
- Proven as the differentiable rasterization backend in high-impact NVIDIA research projects (nvdiffrec, GET3D, Magic3D) and integrated into NVIDIA Kaolin for broader use
- Supports both PyTorch and TensorFlow frontends, though PyTorch is the more actively maintained and widely used path
Limitations
- Provides only rasterization primitives, not a complete renderer — users must implement shading, lighting, material models, and the full rendering loop themselves, requiring deep knowledge of the rasterization pipeline
- Strictly requires an NVIDIA GPU with CUDA support — there is no CPU fallback, no AMD support, and no Apple Silicon path, limiting accessibility
- The NVIDIA Source Code License is more restrictive than standard open source licenses (MIT, BSD, Apache) — users should review the license terms carefully for commercial and redistribution use cases
- Steep learning curve for users expecting a high-level rendering API — this is an expert-level tool designed for researchers who understand vertex processing, fragment interpolation, and anti-aliasing at the hardware level
Background
nvdiffrast is a library from NVIDIA Research that provides high-performance differentiable rasterization primitives — the fundamental building blocks for constructing custom differentiable rendering pipelines. Rather than offering a complete renderer with built-in shading, materials, and lighting, nvdiffrast exposes four core operations (vertex transformation, rasterization, interpolation, and anti-aliasing) as differentiable modules that researchers compose into application-specific pipelines.
The library's key technical contribution is its approach to differentiable anti-aliasing, which addresses the discontinuity problem that plagues naive differentiable rasterizers. When object silhouettes move across pixel boundaries during gradient-based optimization, standard rasterization produces zero or incorrect gradients. nvdiffrast solves this by analytically computing coverage at silhouette edges, producing clean gradients that enable reliable optimization of geometry, texture, and camera parameters.
nvdiffrast achieves its performance through custom CUDA kernels with OpenGL or Vulkan interop for hardware-accelerated rasterization, making it fast enough for training loops that require millions of rendering iterations. It supports both PyTorch and TensorFlow as frontend frameworks, though the PyTorch path receives more active maintenance. The library has become a standard backend for several high-profile NVIDIA research projects including nvdiffrec (3D reconstruction) and GET3D (3D generative model), and is integrated into NVIDIA Kaolin as the default differentiable rasterization engine.
Quick Start
pip install nvdiffrastRelated Renderers
Community & Resources
Community
Paper & Citations
Tutorials & Resources
Performance Benchmarks
No benchmark data available for nvdiffrast yet.
Benchmarks will be added as more renderers are tested across our standard scene suite.
Learn about our methodology