From Turing Machine to Global Illumination Outline o
From Turing Machine to Global Illumination
Outline o o o My first computer (CASIO fx 3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs
Calculator vs. Computer o o o What is the difference between a calculator and a computer? Doesn’t a compute-r just “compute”? The Casio fx 3600 p calculated can be programmed (38 steps allowed).
Turing Machine o o o Can be adapted to simulates the logic of any computer that could possibly be constructed. von Neumann architecture implements a universal Turing machine. Look them up at Wikipedia!
Outline o o o My first computer (CASIO fx 3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs
Simplified View Transform (& Lighting) o Rasterization The Data Flow: 3 D Polygons (+Colors, Lights, Normals, Texture Coordinates…etc. ) à 2 D Polygons à 2 D Pixels (I. e. , Output Images)
Outline o o o My first computer (CASIO fx 3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs
Global Effects shadow multiple reflection translucent surface
Local vs. Global
How Does GPU Draw This?
Quiz o Q 1: A straightforward GPU pipeline give us local illumination only. Why? Hint: How is an object drawn? Do they consider the relationship with other objects? o Q 2: What typical effects are missing? Shadow, reflection, and refraction…
o Wait but I’ve seen shadow and reflection in games before… With Shadows Without Shadows
Outline o o o My first computer (CASIO fx 3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs
Adding “Memory” to the GPU Computation o Modern GPUs allow: n n The usage of multiple textures. Rendering algorithms that use multiple passes. Transform (& Lighting) Rasterization Textures
Faked Global Illumination o o Shadow, Reflection, BRDF…etc. In theory, real global illumination is not possible in current graphics pipeline: n n o Conceptually a loop of individual polygons. No interaction between polygons. Can this be changed by multi-pass rendering?
Case Study: Shadow Map o o Using two textures: color and depth Relatively straightforward design using pixel (fragment) shaders on GPUs.
Eye’s View Light’s View Depth/Shadow Map Image Source: Cass Everitt et al. , “Hardware Shadow Mapping” NVIDIA SDK White Paper
Basic Steps of Shadow Maps o o Render the scene from the light’s point of view, Use the light’s depth buffer as a texture (shadow map), Projectively texture the shadow map onto the scene, Use “texture color” (comparison result) in fragment shading.
Outline o o o My first computer (CASIO fx 3600) Turning machine and von Neumann architecture GPU pipeline Local and global illumination Shadow and reflection through texture Programmable GPUs
PC Graphics Architecture o o o Two buses on PC: System Bus (CPUMemory) and Peripheral I/O Bus. Before AGP: narrow path (I/O Bus) between main memory and graphics memory (for frame buffer, Z buffer, texture, vertex data…etc. ) AGP and PCI-e speed up the link between host PC and graphics processor (GPU)
Source: http: //www. karbosguide. com/hardware/module 2 d 03 a. htm
NVIDIA Geforce 6800
NVIDIA Geforce 8800
NVIDIA Fermi (Geforce 400 and 500 Series) From NVIDIA Fermi Architecture Whitepaper http: //www. nvidia. com/content/PDF/fermi_white_papers/NVIDIA_Fermi_Compute_Architecture_Whitepaper. pdf
How to Program a GPU? o Writing a 3 D graphics application program n n n o Typically in Direct. X or Open. GL Still CPU programming in C/C++ The APIs and drivers do the dirty work for you. Writing GPU shaders n n n Typically in GLSL or Cg Still drawing 3 D objects Working like plug-in’s to the 3 D rendering pipeline
GPGPU o General-purpose GPU computing n n o No longer restricted to graphics applications. To utilize the abundant “GFLOPs” in GPU. Could be implemented in GPU shaders n n n By clever transformation of problem domains. Textures to store the data structures However, shaders could not perform memory writes with calculated addresses (a. k. a. scatter operations)
GPU as a Parallel Computing Platform o Treating GPUs as parallel machinery n n o NVIDIA CUDA n o Not quite the same as shared-memory multiprocessor. A special kind of memory hierarchy. Widely adopted in real-world applications Open. CL n For non-NV GPUs and multi-core CPUs
Branch Divergence on GPU Warp … if x 1 – x 0 > y 1 – y 0: x. Major. Iteration() else: y. Major. Iteration() … ½ performance for each branch!
- Slides: 30