programmable

programmable - CS148 Introduction to Computer Graphics and...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 CS148: Introduction to Computer Graphics and Imaging Programmable Graphics Pipelines CS148 Lecture 14 Pat Hanrahan, Winter 2009 Topics The fixed-function graphics pipeline Programmable stages ± Vertex shaders ± Fragment shaders GL shading language (GLSL) Mapping other applications to GPUs
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 2 The Graphics Pipeline CS148 Lecture 14 Pat Hanrahan, Winter 2009 A Trip Down the Graphics Pipeline Command Assembly Rasterization Texture Fragment Display Vertex FB ops
Background image of page 2
Page 3 CS148 Lecture 14 Pat Hanrahan, Winter 2009 Application Simulation Input event handlers Modify data structures Database traversal Primitive generation Graphics library utility functions (glu*) CS148 Lecture 14 Pat Hanrahan, Winter 2009 Command Command queue Command interpretation Unpack and perform format conversion Maintain graphics state glBegin( GL_TRIANGLE_STRIP ); glColor3f ( 0.0, 0.5, 0.0 ); glVertex3f( 0.0, 0.0, 0.0 ); glColor3f ( 0.5, 0.0, 0.0 ); glVertex3f( 1.0, 0.0, 0.0 ); glColor3f ( 0.0, 0.5, 0.0 ); glVertex3f( 0.0, 1.0, 0.0 ); glMultMatrix( T ); glLoadIdentity( ); glColor3f ( 0.5, 0.0, 0.0 ); glVertex3f( 1.0, 1.0, 0.0 ); glEnd( );
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 4 CS148 Lecture 14 Pat Hanrahan, Winter 2009 Vertex (per-vertex) Vertex transformation Normal transformation Texture coordinate generation Texture coordinate transformation Lighting (light sources and surface reflection) Object-space triangles Screen-space lit triangles CS148 Lecture 14 Pat Hanrahan, Winter 2009 Primitive Assembly Combine transformed/lit vertices into primitives ± 1 vert -> point ± 2 verts -> line ± 3 verts -> triangle Clipping Perspective projection Transform to window coordinates (viewport) Determine orientation (CW/CCW) Back-face cull
Background image of page 4
CS148 Lecture 14 Pat Hanrahan, Winter 2009 Rasterization Setup (per-triangle) Sampling (triangle = {fragments}) Interpolation (interpolate colors and coordinates) Screen-space triangles Fragments CS148 Lecture 14 Pat Hanrahan, Winter 2009 Texture Textures are arrays indexed by floats (Sampler) Texture address calculation Texture interpolation and filtering Fragments Texture Fragments
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/12/2010.

Page1 / 18

programmable - CS148 Introduction to Computer Graphics and...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online