DOC PREVIEW
UTK CS 594 - Shader Programming

This preview shows page 1-2-3-4-26-27-28-54-55-56-57 out of 57 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 57 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Shader ProgrammingThe University of TennesseeDr. Jian HuangPresented by: Jamison Danielwww.cs.utk.edu/~daniel/shadersSpecialized and Expensive Graphics Hardware• Silicon Graphics (SGI) and Evans & Sutherland designed specialized and expensive graphics hardware.• Introduced vertex transformation and texture mapping.• Extremely expensive; no mass-market success.Noninteractive Shading Languages• Open ended control of the appearance of rendered surfaces in the pursuit of photorealism requires programmability. • Renderman Shading Language developed by Pixar Animation Studio in the late 1980s.• Inspired by an earlier idea called shade trees. [Rob Cook SIGGRAPH 1984]Pixar Animation StudioPhotoRealistic Renderman™“Dumb” Frame Buffers• IBM introduced Video Graphics Array (VGA) hardware in 1987.• CPU was responsible for updating all the pixels.• All aspects of computer graphics were “programmable”.First Generation GPUs (up to 1998)• nVidia’s TNT2, ATI’s Rage, and 3dfx’s Voodoo3.• Capable of rasterizing pre-transformed triangles and applying one or two textures.• Completely relieve the CPU from updating individual pixels.• Lack the ability to transform vertices of 3D objects (vertex transformations occur on the CPU).• Limited set of math operations for combining textures to compute the color of rasterized pixels.Second Generation GPUs• nVidia’s GeForce 256 and GeForce2, ATI’s Radeon 7500, and S3’s Savage3D.• Offload 3D vertex transformation and lighting (T&L) from the CPU.• Expanded set of math operations for combining textures and coloring pixels, including cube map textures and signed math operations.• Not programmable.Third-Generation GPUs• nVidia’s GeForce3 and GeForce4 Ti, Microsoft's Xbox, and ATI’s Radeon 8500.• Provides vertex programmability rather than merely offering more configurability.• More pixel-level configurability but not programmability.• ARB_vertex_program exposes vertex-level programmability to applications.Fourth-Generation GPUs (2002)• nVidia’s GeForce FX family with CineFX architecture and ATI’s Radeon 9700/9800.• Provide both vertex-level and pixel-level programmability.• Both ARB_vertex_program and ARB_fragment_programGenerating Realistic Interactive Images is an “embarrassingly parallel problem”.• Graphics hardware designers can repeatedly split up the problem of creating realistic images into more chunks of work that are smaller and easier to tackle.• Then hardware engineers can arrange, in parallel, the ever-greater number of transistors available to execute all these various chunks of work.• The graphics pipeline is a sequence of stages operating in parallel and in a fixed order.• Each stage receives its input from the prior stage and sends its output to the subsequent stage.Vertex Transformation• First processing stage in the graphics hardware pipeline that performs a series of math operations on each vertex.• Includes transforming the vertex position into a screen position for use by the rasterizer, generating texture coordinates, and lighting the vertex to determine its color.Primitive Assembly and Rasterization• Assembles vertices into geometric primitives based on the geometric primitive batching information that accompanies a sequence of vertices.• Polygons that survive the clipping and culling steps must be rasterized. The results of rasterization are a set of pixel locations as well as a set of fragments.Fragment vs. Pixel• A pixel represents the contents of the frame buffer at a specific location.• A fragment is the state required potentiallyto update a particular pixel.• A fragment has an associated pixel location, a depth value, and a set of interpolated parameters.Interpolation, Texturing, and Coloring• Once a primitive is rasterized into a collection of fragments, the interpolation, texturing, and coloring stage interpolates the fragment parameters as necessary, performs a sequence of texturing and math operations, and determines a final color for each fragment.Raster Operations• The raster operation stage checks each fragment based on a number of tests, including the scissor, alpha, stencil, and depth tests. If any test fails, this stage discards the fragment without updating the pixel’s color value.• Finally, a frame buffer write operation replaces the pixel’s color with the blended color.Fixed Function Limitations• The fundamental limitations thus far in PC graphics accelerators has been that they are fixed-function.• Silicon designers have hard-coded specific graphics algorithms into the graphics chips, and as a result application developers have been limited to using these specific algorithms.OpenGL• Unextended OpenGL mandates a certain set of configurable, per-vertex computations defining vertex transformation, texture coordinate generation and transformation and lighting.• Several extensions have added further per-vertex computations to OpenGL (ARB_texture_cube_map, NV_texgen_reflection, NV_texgen_emboss, EXT_vertex_weighting)• Each such extension adds a small set of relatively flexible per-vertex computations.OpenGL• The per-vertex computations for standard OpenGL given a particular set of lighting and texture coordinate generation modes (along with any state for extensions defining per-vertex computations) is, in essence, a vertex program.• However, the sequence of operations is defined implicitly by the current OpenGL state settings rather than defined explicitly as a sequence of instructions.Vertex Program• A vertex program is a sequence of floating point 4-component vector operations that determines how a set of program parameters (defined outside of OpenGL’s Begin/End pair) and an input set of per-vertex parameters are transformed to a set of per-vertex result parameters.Two Ways To Process Vertices1. “Fixed-function” pipeline. This is the standard Transform and Lighting (T&L) pipeline, where the functionality is essentially fixed. The T&L pipeline can be controlled by setting render states, matrices, and lighting and material properties.2. Vertex ShadersVertex Shader Application• Procedural geometry (cloth, soap bubbles [Isidoro/Gosslin]• Skinning and vertex blending [Gosselin]• Texture Generation [Riddle/Zecha]• Advanced Keyframe Interpolation (complex facial expressions and speech)• Particle System Rendering• Real-time modification of the Perspective View (lens effects,


View Full Document

UTK CS 594 - Shader Programming

Documents in this Course
Load more
Download Shader Programming
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Shader Programming and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Shader Programming 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?