DOC PREVIEW
MIT 6 837 - Modern Graphics Hardware

This preview shows page 1-2-3-4-5 out of 15 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 15 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 15 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 15 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 15 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 15 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 15 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1MIT EECS 6.837, Cutler and Durand1MIT EECS 6.837Frédo Durand and Barb CutlerSlides and demos from Hanrahan & Akeley, Gary McTaggart NVIDIA, ATIModern Graphics HardwareMIT EECS 6.837, Cutler and Durand2Modern 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 Durand3MIT EECS 6.837, Cutler and Durand4MIT EECS 6.837, Cutler and Durand5MIT EECS 6.837, Cutler and Durand62MIT EECS 6.837, Cutler and Durand7Questions?MIT EECS 6.837, Cutler and Durand8MIT EECS 6.837, Cutler and Durand9MIT EECS 6.837, Cutler and Durand10MIT EECS 6.837, Cutler and Durand11MIT EECS 6.837, Cutler and Durand123MIT EECS 6.837, Cutler and Durand13MIT EECS 6.837, Cutler and Durand14MIT EECS 6.837, Cutler and Durand15MIT EECS 6.837, Cutler and Durand16(This part often separated as “raster op”)MIT EECS 6.837, Cutler and Durand17MIT EECS 6.837, Cutler and Durand18Questions?4MIT EECS 6.837, Cutler and Durand19Programmable 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 Durand20Vertex 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 Durand21Pixel ShadersPixel shaders have limited or no knowledge of neighbouring pixelsEach pixel is calculated individuallySlide from NVidiaMIT EECS 6.837, Cutler and Durand22Allows for amazing qualityMIT EECS 6.837, Cutler and Durand23Rich 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 Durand24How 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 tricks5MIT EECS 6.837, Cutler and Durand25What 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;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 Durand26Cg 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 Durand27Brushed Metal••Procedural textureProcedural texture••Anisotropic Anisotropic lightinglightingMIT EECS 6.837, Cutler and Durand28Melting Ice••Procedural, Procedural, animating animating texturetexture••Bumped Bumped environment environment mapmapMIT EECS 6.837, Cutler and Durand29Toon & FurToonToonrendering without texturesrendering without texturesAntialiasingAntialiasingGreat silhouettes without Great silhouettes without overdarkeningoverdarkeningVolume fur using ray marchingVolume fur using ray marchingShell approach without shellsShell approach without shellsCan be selfCan be self--shadowingshadowingMIT EECS 6.837, Cutler and Durand30Vegetation & Thin FilmTranslucenceTranslucenceBacklightingBacklightingExample of custom lightingExample of custom lightingSimulates iridescenceSimulates iridescence6MIT EECS 6.837, Cutler and Durand31General 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 Durand32Questions?MIT EECS 6.837, Cutler and Durand33Graphics Hardware• High performance through – Parallelism – Specialization– No data dependency– Efficient pre-fetchingGRTFDGRTFDGRTFDGRTFDtask parallelismdata parallelismMIT EECS 6.837, Cutler and Durand34Modern Graphics Hardware• A.k.a Graphics Processing Units (GPUs)• Programmable geometry and fragment stages• 600 million vertices/second, 6 billion texels/second• In the range of tera operations/second• Floating point operations only• Very little cacheMIT EECS 6.837, Cutler and Durand35Modern Graphics Hardware• About 4-6 geometry units• About 16 fragment units• Deep pipeline (~800 stages)• Tiling of screen (about 4x4)– Early z-rejection if entire tile is occluded• Pixels rasterized by quads (2x2 pixels)– Allows for derivatives• Very efficient texture pre-fetching– And smart memory layoutMIT EECS 6.837, Cutler and Durand36Why is it so fast?• All transistors do computation, little cache• Parallelism• Specialization (rasterizer, texture filtering)• Arithmetic intensity• Deep pipeline, latency hiding, prefetching• Little data dependency• In general, memory-access patterns7MIT EECS 6.837, Cutler and Durand37Questions?MIT EECS 6.837, Cutler and Durand38VrasterizerFropcross-bar16 fragment units16 raster operation unitsz buffer, framebufferScreen-locked6 vertex units16 texture unitsmipmapfilteringArchitectureV V V V VF F F F F F F F F F F F F F FTexTexTexTexTexTexOne big parallel rasterizerropropropropropropropropropropropropropropropMIT EECS 6.837, Cutler and Durand39VrasterizerFropcross-barV V V V VF F F F F F F F F F F F F F FTexTexTexTexTexTexropropropropropropropropropropropropropropropTotal: 250 operations per vertex150operations per fragment7 interpolants150 ops/vertex25


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?