frame buffer depth buffer stencil buffer

Similar documents
Programmable GPUS. Last Time? Reading for Today. Homework 4. Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes

CSE528 Computer Graphics: Theory, Algorithms, and Applications

Texture Mapping II. Light maps Environment Maps Projective Textures Bump Maps Displacement Maps Solid Textures Mipmaps Shadows 1. 7.

CS451 Texturing 4. Bump mapping continued. Jyh-Ming Lien Department of Computer SCience George Mason University. From Martin Mittring,

CS GPU and GPGPU Programming Lecture 7: Shading and Compute APIs 1. Markus Hadwiger, KAUST

Texturing. Texture Mapping. Texture Mapping. Have seen: colour can be assigned to ver7ces But: don t want to represent all this detail with geometry

Procedural Modeling. Last Time? Reading for Today. Reading for Today

Texture-Mapping Tricks. How Bad Does it Look? We've Seen this Sort of Thing Before. Sampling Texture Maps

CS427 Multicore Architecture and Parallel Computing

Real - Time Rendering. Graphics pipeline. Michal Červeňanský Juraj Starinský

Shaders. Slide credit to Prof. Zwicker

Lecture 2. Shaders, GLSL and GPGPU

lecture 18 - ray tracing - environment mapping - refraction

Graphics and Imaging Architectures

Computer Graphics. Lecture 14 Bump-mapping, Global Illumination (1)

CSE 591: GPU Programming. Introduction. Entertainment Graphics: Virtual Realism for the Masses. Computer games need to have: Klaus Mueller

Graphics Hardware. Instructor Stephen J. Guy

3D Rasterization II COS 426

Surface Rendering. Surface Rendering

Pipeline Operations. CS 4620 Lecture Steve Marschner. Cornell CS4620 Spring 2018 Lecture 11

CS 179: GPU Programming

CS 431/636 Advanced Rendering Techniques

CS GPU and GPGPU Programming Lecture 2: Introduction; GPU Architecture 1. Markus Hadwiger, KAUST

CSE 167: Introduction to Computer Graphics Lecture #7: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Spring Quarter 2015

Pipeline Operations. CS 4620 Lecture 14

Scanline Rendering 2 1/42

Graphics Hardware. Graphics Processing Unit (GPU) is a Subsidiary hardware. With massively multi-threaded many-core. Dedicated to 2D and 3D graphics

For Intuition about Scene Lighting. Today. Limitations of Planar Shadows. Cast Shadows on Planar Surfaces. Shadow/View Duality.

Advanced Shading and Texturing

Tutorial on GPU Programming #2. Joong-Youn Lee Supercomputing Center, KISTI

Chapter 7 - Light, Materials, Appearance

CS195V Week 9. GPU Architecture and Other Shading Languages

Cornell University CS 569: Interactive Computer Graphics. Introduction. Lecture 1. [John C. Stone, UIUC] NASA. University of Calgary

Last Time. Why are Shadows Important? Today. Graphics Pipeline. Clipping. Rasterization. Why are Shadows Important?

Spring 2011 Prof. Hyesoon Kim

Those Delicious Texels or Dynamic Image-Space Per-Pixel

Cg: A system for programming graphics hardware in a C-like language

Spring 2009 Prof. Hyesoon Kim

CMSC427 Advanced shading getting global illumination by local methods. Credit: slides Prof. Zwicker

Complex Shading Algorithms

Intro to Ray-Tracing & Ray-Surface Acceleration

CSE 167: Introduction to Computer Graphics Lecture #6: Lights. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2014

Cg 2.0. Mark Kilgard

3D Programming. 3D Programming Concepts. Outline. 3D Concepts. 3D Concepts -- Coordinate Systems. 3D Concepts Displaying 3D Models

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

The Rasterization Pipeline

X. GPU Programming. Jacobs University Visualization and Computer Graphics Lab : Advanced Graphics - Chapter X 1

TEXTURE MAPPING. DVA338 Computer Graphics Thomas Larsson, Afshin Ameri

The Traditional Graphics Pipeline

Multi-View Soft Shadows. Louis Bavoil

GLSL Introduction. Fu-Chung Huang. Thanks for materials from many other people

3D Computer Games Technology and History. Markus Hadwiger VRVis Research Center

Interpolation using scanline algorithm

CSE 591/392: GPU Programming. Introduction. Klaus Mueller. Computer Science Department Stony Brook University

CS354 Computer Graphics Ray Tracing. Qixing Huang Januray 24th 2017

Computer Graphics 1. Chapter 7 (June 17th, 2010, 2-4pm): Shading and rendering. LMU München Medieninformatik Andreas Butz Computergraphik 1 SS2010

Programming Graphics Hardware

The Rasterization Pipeline

CSE 167: Lecture #8: GLSL. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2012

Zeyang Li Carnegie Mellon University

Rendering. Converting a 3D scene to a 2D image. Camera. Light. Rendering. View Plane

Texture mapping. Computer Graphics CSE 167 Lecture 9

Computergrafik. Matthias Zwicker. Herbst 2010

CSE 167: Introduction to Computer Graphics Lecture #18: More Effects. Jürgen P. Schulze, Ph.D. University of California, San Diego Fall Quarter 2016

Last Time. Reading for Today: Graphics Pipeline. Clipping. Rasterization

Hardware Accelerated Volume Visualization. Leonid I. Dimitrov & Milos Sramek GMI Austrian Academy of Sciences

The Traditional Graphics Pipeline

Introduction to Shaders.

Levy: Constraint Texture Mapping, SIGGRAPH, CS 148, Summer 2012 Introduction to Computer Graphics and Imaging Justin Solomon

Sung-Eui Yoon ( 윤성의 )

Shaders CSCI 4239/5239 Advanced Computer Graphics Spring 2014

COMP 4801 Final Year Project. Ray Tracing for Computer Graphics. Final Project Report FYP Runjing Liu. Advised by. Dr. L.Y.

Real-Time Rendering (Echtzeitgraphik) Michael Wimmer

Hardware Shading: State-of-the-Art and Future Challenges

CHAPTER 1 Graphics Systems and Models 3

DEFERRED RENDERING STEFAN MÜLLER ARISONA, ETH ZURICH SMA/

Rendering Algorithms: Real-time indirect illumination. Spring 2010 Matthias Zwicker

Homework 3: Programmable Shaders

OpenGl Pipeline. triangles, lines, points, images. Per-vertex ops. Primitive assembly. Texturing. Rasterization. Per-fragment ops.

Evolution of GPUs Chris Seitz

GPGPU. Peter Laurens 1st-year PhD Student, NSC

Lecture 11of 41. Surface Detail 2 of 5: Textures OpenGL Shading

Mach band effect. The Mach band effect increases the visual unpleasant representation of curved surface using flat shading.

Shading/Texturing. Dr. Scott Schaefer

Graphics Hardware. Computer Graphics COMP 770 (236) Spring Instructor: Brandon Lloyd 2/26/07 1

The Graphics Pipeline

CS 354R: Computer Game Technology

Parallax Bumpmapping. Whitepaper

The Ultimate Developers Toolkit. Jonathan Zarge Dan Ginsburg

CS230 : Computer Graphics Lecture 4. Tamar Shinar Computer Science & Engineering UC Riverside

Graphics Hardware, Graphics APIs, and Computation on GPUs. Mark Segal

Deferred Rendering Due: Wednesday November 15 at 10pm

Real-Time Reyes: Programmable Pipelines and Research Challenges. Anjul Patney University of California, Davis

CS451Real-time Rendering Pipeline

Announcements. Written Assignment 2 is out see the web page. Computer Graphics

Programmable Graphics Hardware

Topics and things to know about them:

NVIDIA Case Studies:

CS5620 Intro to Computer Graphics

Parallelizing Graphics Pipeline Execution (+ Basics of Characterizing a Rendering Workload)

Transcription:

Final Project Proposals Programmable GPUS You should all have received an email with feedback Just about everyone was told: Test cases weren t detailed enough Project was possibly too big Motivation could be strengthened Use proper bibliographic citation Individuals implementing refraction/rainbows should consider teaming up In person/email discussion with me and/or revised proposal suggested Last Time? Planar Shadows Projective Texture Shadows Shadow Maps Shadow Volumes Stencil Buffer frame buffer depth buffer stencil buffer Modern Graphics Hardware Programmable Graphics Hardware High performance through Parallelism Specialization No data dependency Efficient pre-fetching task parallelism data parallelism G" P! F" P! Geometry and pixel (fragment) stage become programmable Elaborate appearance More and more general-purpose computation (GPU hacking) 1

Misc. Stats on Graphics Hardware 2005 4-6 geometry units, 16 fragment units Deep pipeline (~800 stages) NVIDIA GeForce 9 (Feb 2008) 32/64 cores, 512 MB/1GB memory ATI Radeon R700 (2008) 480 stream processing units NVIDIA GeForce GTX 480 (2010) 480 cores, 1536 MB memory 2560x1600 resolution ATI Radeon HD 7900 (2012) 2048 processors, 3GB memory NVIDIA GeForce GTX 680 (2012) 1536 cores, 2040 MB memory Cg design goals GLSL examples Emerging & Evolving Languages Inspired by Shade Trees [Cook 1984] & Renderman Shading Language [1980 s]: RTSL [Stanford 2001] real-time shading language Cg [NVIDIA 2003] C for graphics HLSL [Microsoft 2003] Direct X GLSL [OpenGL ARB 2004] OpenGL 2.0 Optix [NVIDIA 2009] Real time ray tracing engine for CUDA General Purpose GPU computing CUDA [NVIDIA 2007] OpenCL (Open Computing Language) [Apple 2008] for heterogeneous platforms of CPUs & GPUs Cg Design Goals Cg: A system for programming graphics hardware in a C-like language Mark et al. SIGGRAPH 2003 Ease of programming Portability Complete support for hardware functionality Performance Minimal interference with application data Ease of adoption Extensibility for future hardware Support for non-shading uses of the GPU Cg Design Hardware is changing rapidly [2003] no single standard Specify profile for each hardware May omit support of some language capabilities (e.g., texture lookup in vertex processor) Use hardware virtualization or emulation? Performance would be so poor it would be worthless for most applications Well, it might be ok for general purpose programming (not real-time graphics) Cg compiler vs. GPU assembly Can inspect the assembly language produced by Cg compiler and perform additional optimizations by hand Generally once development is complete (& output is correct) Using Cg is easier than writing GPU assembly from scratch 2

(Typical) Language Design Issues Parameter binding Call by reference vs. call by value Data types: 32 bit float, 16 bit float, 12 bit fixed & type-promotion (aim for performance) Specialized arrays or general-purpose arrays float4 x vs. float x[4] Indirect addressing/pointers (not allowed ) Recursion (not allowed ) Cg design goals GLSL examples GLSL example: checkerboard.vs GLSL example: checkerboard.fs Remember Gouraud Shading? Instead of shading with the normal of the triangle, we ll shade the vertices with the average normal and interpolate the shaded color across each face This gives the illusion of a smooth surface with smoothly varying normals Phong Normal Interpolate the average vertex normals across the face and compute per-pixel shading Normals should be re-normalized (ensure length=1) (Not Phong Shading) Before shaders, per-pixel shading was not possible in hardware (Gouraud shading is actually a decent substitute!) 3

Bump Mapping Displacement Mapping Environment Mapping Light Mapping Normal Mapping Parallax Mapping Parallax Occlusion Mapping Bump Mapping Use textures to alter the surface normal Does not change the actual shape of the surface Just shaded as if it were a different shape Sphere w/diffuse Texture Swirly Bump Map Sphere w/diffuse Texture & Bump Map Another GLSL example: orange.vs Another GLSL example: orange.fs Bump Mapping Another Bump Map Example Treat a greyscale texture as a single-valued height function Compute the normal from the partial derivatives in the texture Bump Map Cylinder w/diffuse Texture Map Cylinder w/texture Map & Bump Map 4

Normal Mapping Variation on Bump Mapping: Use an RGB texture to directly encode the normal What's Missing? There are no bumps on the silhouette of a bump-mapped or normal-mapped object Bump/Normal maps don t allow self-occlusion or self-shadowing http://en.wikipedia.org/wiki/file:normal_map_example.png Bump Mapping Displacement Mapping Environment Mapping Light Mapping Normal Mapping Parallax Mapping Parallax Occlusion Mapping Displacement Mapping Use the texture map to actually move the surface point The geometry must be displaced before visibility is determined Displacement Mapping Displacement Mapping Image from: Geometry Caching for Ray-Tracing Displacement Maps EGRW 1996 Matt Pharr and Pat Hanrahan note the detailed shadows cast by the stones Ken Musgrave 5

Parallax Mapping a.k.a. Offset Mapping or Virtual Displacement Mapping Displace the texture coordinates for each pixel based on view angle and value of the height map at that point Parallax Occlusion Mapping At steeper view-angles, texture coordinates are displaced more, giving illusion of depth due to parallax effects Brawley & Tatarchuk 2004 Per pixel ray tracing of the heightfield geometry Occlusions & soft shadows Detailed shape representation with parallax mapping, Kaneko et al. ICAT 2001 http://developer.amd.com/media/gpu_assets/ Tatarchuk-ParallaxOcclusionMapping-Sketch-print.pdf Environment Maps Modern Graphics Hardware Shader Programming Languages Gouraud Shading vs. Phong Normal Many Mapping techniques We can simulate reflections by using the direction of the reflected ray to index a spherical texture map at "infinity". Bump Mapping Displacement Mapping Environment Mapping Light Mapping Assumes that all reflected rays begin from the same point. Normal Mapping Parallax Mapping Parallax Occlusion Mapping What's the Best Chart? Environment Mapping Example Terminator II 6

Texture Maps for Illumination Questions? Also called "Light Maps" Quake Image by Henrik Wann Jensen Environment map by Paul Debevec Reading for : Readings for Friday: Chris Wyman, "An Approximate Image-Space Approach for Interactive Refraction, SIGGRAPH 2005 Choose: An Image Synthesizer, Perlin, SIGGRAPH 1985 & Improving Noise, Perlin, SIGGRAPH 2002 Procedural Modeling of Buildings Mueller, Wonka, Haegler, Ulmer & Van Gool, SIGGRAPH 2006 7