Title: Ray Tracing on Programmable Graphics Hardware
1Ray Tracing on Programmable Graphics Hardware
SIGGRAPH 2002
- Timothy J. Purcell Ian Buck
- William R. Mark Pat Hanrahan
Sungbae Kim Master Student in CS
2Contributions
- Abstract streaming graphics processor
- Implement ray tracing using GPU
- Help guide the design of future architectures
3Why ray tracing?
- Ray tracing for the movie Cars
4Ray tracing pros and cons
- Good quality
- Simple algorithm
- Expensive cost
- ? How to accelerate ray tracing
5Basic Ray tracing algorithm
- Shoot eye rays
- Find the first intersection
- Calculates the illumination
- Reflection? Calls itself
- Transmission? Calls itself
- Combines the resulting illumination
6Basic Ray tracing
?
Note that each pixel is independent
7Find intersection
8Uniform Grid
9How to accelerate
- Many algorithms
- Use parallel systems
- Massively parallel shared memory supercomputer
-ray - Cluster of commodity PCs RTRT
- Special hardware for ray tracing
- Streaming Programming Model this papers
approach
10Streaming Programming Model
- A stream is a set of data records
- Kernels operate on each element of an input
stream independently - Kernels can read from global memory
- Streams connect kernels
11Streaming Ray Tracer
Screen Pixels
Eye Ray Generator
Camera
Rays
Traverser
Grid
(Ray, Voxel)
Intersector
Triangles
Hits
Shader
Materials
Pixel color updates
12Programmable Graphics Processor Abstraction
- We can use GPU as Streaming Processor
- But limited streaming processor
13GPU Ray Tracer
- Limited ? How to map
- Global Memory
- Kernel to Kernel connection
- No loop, No branch
14Texture Memory Mapping
- We can use texture as global memory
- Store non-RGB values in textures
For example, The Second triangle of the second
grind
Also Rays, Materials
15Kernel to Kernel
- Copy output fragments into Texture
16No loop No Branch
- Multipass operate again until every is done
- Do
- bodyfp()
- while ( donefp() )
- State z-value, stencil bit
- For performance early z-culling, stencil mask
-
17Simulation Result
18GPU vs. CPU
Radeon 9700 Pro CPU
Ray-triangle intersections/s 100M 20M in P3 800 MHz
Ray/s 300K to 4.0M 800K to 7.1M 1.8M to 2.3M (With simple shading) in P4 2.5 GHz
19GPU vs. CPU
- Graphics processor evolves faster
20Demo
Shadow rays 10.5 fps
Eye rays, Shadow rays, Reflection rays 1.0 fps
Shadow rays 1.8 fps
21AppendixGeneral Purpose GPU(GPGPU)
- GPU, Shader, GLSL, HLSL, Cg, OpenGL, Direct3D.
- BrookGPU (Stanford)
- CUDA (NVIDIA)
22AppendixCell Processor
- IBM, SONY, TOSHIBA
- Interactive ray tracer iRT
- More faster than GPU