Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← The Programmable Pipeline - Interactive 3D Graphics

Get Embed Code
3 Languages

Showing Revision 2 created 05/24/2016 by Udacity Robot.

  1. To get back to the rendering Pipeline, our simplified view is this. The
  2. Application sends a triangle to the GPU. The GPU determines where the triangles
  3. vertices are on the screen, including the z-depth. Each pixel inside the
  4. triangle is shaded. If the pixel passes the z-buffer test It is then saved to
  5. the image and displayed at the end of the frame. Modern GPUs have parts of the
  6. Pipeline that are Programmable. The transformed screen part of the Pipeline is
  7. done by what is called a Vertex Shader. This Programmable element, essentially a
  8. little computer, processes each Vertex of the triangle. The Vertex Shader uses
  9. information provided to it to manipulate each Vertex in some way. For example,
  10. the color of the triangle at this point could be computed, or the vertexes
  11. position could be modified, if, for example, you wanted to have an object
  12. inflate or explode. One operation the vertex shader always does is to output a
  13. location of the vertex on the screen. The second half of our modern GPU
  14. Pipeline, we represent here by two stages. Triangle set up in the Fragment
  15. Shader. Triangle set up uses the three screen locations generated by the Vertex
  16. Shader for an incoming triangle. This forms a triangle in screen space. Each
  17. pixel covered by part of the triangle has what is called a Fragment generated
  18. for it. This process is called scan conversion. The Fragments generated are sent
  19. to the Fragment Shader. Well if you used Microsoft's Direct X API, this is
  20. called the Pixel Shader instead. The Fragment Shader is provide information by
  21. the triangle being processed. Some to the Vertex Shader the programmer can also
  22. feed in any other data desired. The Fragment Shader runs a program that
  23. typically a Color an a Z Depth value. This Z Depth value is then tested against
  24. the Z buffer as usual. If the surface is visible, the color is saved for that
  25. Pixel. The shade Pipeline is designed to compute the Color at each Pixel the
  26. surface covers. That's it's ultimate purpose after all, creation of an image.
  27. Everything done in the Pipeline comes down to this. How DO WE EFFICIENTLY
  28. CALCULATE THIS COLOR? That's what the last half of this unit is about, materials
  29. and how they work. Given a material and some incoming light you want to compute
  30. a Color off that material.