Académique Documents
Professionnel Documents
Culture Documents
NVIDIA Research
Outline
Rasterization
Laine, Karras: High-Performance Software Rasterization on GPUs. Proceedings of High-Performance Graphics 2011.
Voxelization
Pantaleoni: VoxelPipe: A Programmable Pipeline for 3D Voxelization. Proceedings of High-Performance Graphics 2011.
Rationale
Build a research platform
Elbow space for game developers
Building a Pipeline
We implemented a full pixel pipeline using CUDA
From triangle setup to ROP
Design Considerations
Run everything in parallel
We need a lot of threads to fill the machine
Programmable Shading
Pipeline Structure
Chunker-style pipeline with four stages
Triangle setup Bin raster Coarse raster Fine raster Run data in large batches
Separate kernel launch for each stage
Tile 8x8 px
Pixel
Triangle Setup
Vertex buffer positions, attributes Index buffer
...
Triangle Setup
Bin Raster
Triangle data buffer ...
Bin Raster SM 0
Bin Raster SM 1
...
Bin Raster SM 14
Coarse Raster
...
Coarse Raster SM n
One coarse raster SM has exclusive access to the bin its processing
Fine Raster
IDs of triangles that overlap tile
One fine raster warp has exclusive access to the tile its processing
Pixel data in FB
Step along edge (Bresenham-like) Use look-up tables to generate coverage masks ~50 instructions for 8x8 stamp, one edge
Input Phase
Shading Phase
Test Scenes
Call of Juarez scene courtesy of Techland S.T.A.L.K.E.R.: Call of Pripyat scene courtesy of GSC Game World
Performance Results
Attributes
Fetched when used bad latency hiding Expensive interpolation
Antialiasing
Hardware nearly oblivious to MSAA, we much less so
+ Shader complexity
Shader performance theoretically the same as in graphics pipe
Exploration Potential
Shader performance boosters
Compact after discard, quad merging, decoupled sampling,
http://code.google.com/p/cudaraster/
VoxelPipe:
A Programmable Pipeline for 3D Voxelization
What is Voxelization?
Voxelization =
Finding all voxels overlapped by each triangle in a mesh
Shape Matching Collision Detection Fluid / Soft-body Sim Stress Analysis Level of Detail Ray Tracing
A-buffer / bucketing
What is Rasterization?
What is Rasterization?
Highly Variable Expansion Rate source of most load balancing problems
Vertex Shading Fragment Shading
Observations (1)
Rasterization = Sorting of Compressed Batches of Elements
triangles: fragments:
1 f1,1 2 f2,1 3 f3,1 4 f4,1 5 6 n fn,1
f1,2
f1,3
f3,2
f3,3
F4,2
fn,2
f3,1000000
Observations (2)
Decompression and Sorting can be done Hierarchically
emit per-tile fragments sort by tile
Observations (2)
Decompression and Sorting can be done Hierarchically
triangles: fragments:
1
f1,1 f1,2
2
f2,1
3
f3,1 f3,2
4
f4,1 f4,2
n
fn,1 fn,2
f1,3
f3,3
Pipeline Overview
coarse rasterizer (tile,tri) fragments by tri id 1 one tri per thread persist. threads 1 tile sorting tile queues tri 1 fine rasterizer 1 CTA per tile FB tiles
tri 2
radix sort
1
2 2
tri 1 tri 2
tri 3 tri 1
Performance Results
Performance Results
Future Work
The entire codebase will be open-sourced
http://code.google.com/p/voxelpipe/
Thank You
Questions
Further information:
Laine, Karras: High-Performance Software Rasterization on GPUs. Proceedings of High-Performance Graphics 2011.
Pantaleoni: VoxelPipe: A Programmable Pipeline for 3D Voxelization. Proceedings of High-Performance Graphics 2011.