Unformatted text preview:

Modern Graphics HardwareModern graphics hardwareSlide 3Slide 4Slide 5Slide 6Questions?Slide 8Slide 9Slide 10Slide 11Slide 12Slide 13Slide 14Slide 15Slide 16Slide 17Slide 18Programmable Graphics HardwareVertex ShadersPixel ShadersAllows for amazing qualityRich scene appearanceHow to program shaders?What Does Cg look like?Cg SummaryBrushed MetalMelting IceToon & FurVegetation & Thin FilmGeneral Purpose-computation on GPUsSlide 32Graphics HardwareSlide 34Slide 35Why is it so fast?Slide 37ArchitectureSlide 39Vertex shading unit (ATI X800)Pixel shading unit (ATI X800)Slide 42Bottlenecks?Potential BottlenecksRendering pipeline bottlenecksSlide 46Shader zooLayeringFrom Half Life 2 (Valve)Slide 50Slide 51Slide 52Slide 53Slide 54Slide 55Slide 56Slide 57Slide 58Slide 59Slide 60Slide 61Slide 62Slide 63Slide 64Slide 65Slide 66Slide 67Slide 68Slide 69Slide 70Slide 71Slide 72Refraction mapping (multipass)Image processingMore glowVertex Shader: Blendshapes (1/2)Shadow VolumesShadows in a Real Game SceneScene’s Visible Geometric ComplexityBlow-up of Shadow DetailScene’s Shadow Volume Geometric ComplexityVisible Geometry vs. Shadow Volume GeometryOther Example Scenes (1 of 2)Situations When Shadow Volumes Are Too ExpensiveShadow Volumes vs. Shadow MapsSlide 86Hardware Shading for ArtistsSlide 88MIT EECS 6.837, Cutler and Durand 1MIT EECS 6.837Frédo Durand and Barb CutlerSlides and demos from Hanrahan & Akeley, Gary McTaggart NVIDIA, ATIModern Graphics HardwareMIT EECS 6.837, Cutler and Durand 2Modern graphics hardware•Hardware implementation of the rendering pipeline•Programmability & “shaders”–Recent, last few years–At the vertex and pixel levelMIT EECS 6.837, Cutler and Durand 3MIT EECS 6.837, Cutler and Durand 4MIT EECS 6.837, Cutler and Durand 5MIT EECS 6.837, Cutler and Durand 6MIT EECS 6.837, Cutler and Durand 7Questions?MIT EECS 6.837, Cutler and Durand 8MIT EECS 6.837, Cutler and Durand 9MIT EECS 6.837, Cutler and Durand 10MIT EECS 6.837, Cutler and Durand 11MIT EECS 6.837, Cutler and Durand 12MIT EECS 6.837, Cutler and Durand 13MIT EECS 6.837, Cutler and Durand 14MIT EECS 6.837, Cutler and Durand 15MIT EECS 6.837, Cutler and Durand 16(This part often separated as “raster op”)MIT EECS 6.837, Cutler and Durand 17MIT EECS 6.837, Cutler and Durand 18Questions?MIT EECS 6.837, Cutler and Durand 19Programmable Graphics Hardware•Geometry and pixel (fragment) stage become programmable–Elaborate appearance–More and more general-purpose computation (GPU hacking)GPRTFPDMIT EECS 6.837, Cutler and Durand 20Vertex ShadersVertex Shaders are both Flexible and QuickLinear Interpretation of vertex lighting valuesvertex shaders can be used to move/animate vertsSlide from NVidiaMIT EECS 6.837, Cutler and Durand 21Pixel ShadersPixel shaders have limited or no knowledge of neighbouring pixelsEach pixel is calculated individuallySlide from NVidiaMIT EECS 6.837, Cutler and Durand 22Allows for amazing qualityMIT EECS 6.837, Cutler and Durand 23Rich scene appearance•Vertex shader–Geometry (skinning, displacement)–Setup interpolants for pixel shaders•Pixel shader–Visual appearance–Also used for image processing and other GPU abuses•Multipass–Render the scene or part of the geometry multiple times–E.g. shadow map, shadow volume–But also to get more complex shadersMIT EECS 6.837, Cutler and Durand 24How to program shaders?•Assembly code•Higher-level language and compiler (e.g. Cg, HLSL, GLSL)•Send to the card like any piece of geometry•Is usually modified/optimized by the driver•We won’t talk here about other dirty driver tricksMIT EECS 6.837, Cutler and Durand 25What Does Cg look like? Assembly …RSQR R0.x, R0.x;MULR R0.xyz, R0.xxxx, R4.xyzz;MOVR R5.xyz, -R0.xyzz;MOVR R3.xyz, -R3.xyzz;DP3R R3.x, R0.xyzz, R3.xyzz;SLTR R4.x, R3.x, {0.000000}.x;ADDR R3.x, {1.000000}.x, -R4.x;MULR R3.xyz, R3.xxxx, R5.xyzz;MULR R0.xyz, R0.xyzz, R4.xxxx;ADDR R0.xyz, R0.xyzz, R3.xyzz;DP3R R1.x, R0.xyzz, R1.xyzz;MAXR R1.x, {0.000000}.x, R1.x;LG2R R1.x, R1.x;MULR R1.x, {10.000000}.x, R1.x;EX2R R1.x, R1.x;MOVR R1.xyz, R1.xxxx;MULR R1.xyz, {0.900000, 0.800000, 1.000000}.xyzz, R1.xyzz;DP3R R0.x, R0.xyzz, R2.xyzz;MAXR R0.x, {0.000000}.x, R0.x;MOVR R0.xyz, R0.xxxx;ADDR R0.xyz, {0.100000, 0.100000, 0.100000}.xyzz, R0.xyzz;MULR R0.xyz, {1.000000, 0.800000, 0.800000}.xyzz, R0.xyzz;ADDR R1.xyz, R0.xyzz, R1.xyzz;...Cg…COLOR cSpec = pow(max(0, dot(Nf, H)), phongExp).xxx;COLOR cPlastic = Cd * (cAmbi + cDiff) + Cs * cSpec;Simple phong shader expressed in both assembly and CgMIT EECS 6.837, Cutler and Durand 26Cg Summary•C-like language – expressive and efficient•HW data types•Vector and matrix operations•Write separate vertex and fragment programs•Connectors enable mix & match of programsby defining data flows•Will be supported on any DX9 hardware•Will support future HW (beyond NV30/DX9)MIT EECS 6.837, Cutler and Durand 27Brushed Metal•Procedural textureProcedural texture•Anisotropic Anisotropic lightinglightingMIT EECS 6.837, Cutler and Durand 28Melting Ice•Procedural, Procedural, animating animating texturetexture•Bumped Bumped environment environment mapmapMIT EECS 6.837, Cutler and Durand 29Toon & FurToon rendering without texturesToon rendering without texturesAntialiasingAntialiasingGreat silhouettes without overdarkeningGreat silhouettes without overdarkeningVolume fur using ray marchingVolume fur using ray marchingShell approach without shellsShell approach without shellsCan be self-shadowingCan be self-shadowingMIT EECS 6.837, Cutler and Durand 30Vegetation & Thin FilmTranslucenceTranslucenceBacklightingBacklightingExample of custom lightingExample of custom lightingSimulates iridescenceSimulates iridescenceMIT EECS 6.837, Cutler and Durand 31General Purpose-computation on GPUs•Hundreds of Gigaflops –Moore’s law cubed•Becomes programmable–Code executed for each vertex or each pixel•Use for general-purpose computation–But tedious, low level, hacky•Performances not always as good as hoped forNavier-Stokes on GPU [Bolz et al.]MIT EECS 6.837, Cutler and Durand 32Questions?MIT EECS 6.837, Cutler and Durand 33Graphics Hardware•High performance through –Parallelism –Specialization–No data dependency–Efficient pre-fetchingGRTFDGRTFDGRTFDGRTFDtask parallelismdata parallelismMIT EECS 6.837, Cutler and Durand 34Modern Graphics Hardware•A.k.a Graphics Processing Units (GPUs)•Programmable geometry and fragment


View Full Document

MIT 6 837 - Modern Graphics Hardware

Documents in this Course
Shadows

Shadows

64 pages

Animation

Animation

37 pages

Radiosity

Radiosity

25 pages

Color

Color

86 pages

InterArch

InterArch

14 pages

Color

Color

15 pages

Animation

Animation

61 pages

Luxo Jr

Luxo Jr

14 pages

Animation

Animation

52 pages

Radiosity

Radiosity

37 pages

Load more
Download Modern Graphics Hardware
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 Modern Graphics Hardware 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 Modern Graphics Hardware 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?