[MUSIC] Let's recap everything that's happening when we do 3D graphics because it's getting quite complex now. We start off with an object made out of vertices and polygons. And this object also has some transform so it can move around. Then, we take a camera, And that camera performs a perspective transform on the object. So it takes it from 3D and puts it into 2D. At this point, it's still actually just vertices and polygons, but they're just in 2D, they've getting rid of the depth. Next, we render those vertices and polygons to a 2D image, and we apply lighting, So that the image is nicely shaded. And then, we can take an image with texture and apply that to the surface of an image to create a nice detailed surface image. And this is the kind of nice image we get. And obviously, with nicer renders, you'd get something much nicer looking than what I've done there. So, there are lots of different stages to go from polygons all the way to pixels that we see on our computer screen or a head-mounted display. So it's pretty complicated and it's pretty computationally intensive. But actually, the nice thing is that almost all of this process happens on your dedicated graphics hardware. Your graphics processing unit, your GPU. So, only the very first bits happen on your CPU, your central processing unit, that's the main processing, that's the main chip on your computer. And, all that happens there is really defining your polygons, maybe some of the transforms as you move them around, and your interaction. But all the rest of the graphics pipeline, happens on your GPU. The first part of that happens in a set of programs, called a vertex shader. So, that applies the camera transforms that will perform the perspective transformation of the object and it might also do lighting. It's called a vertex shader because it does calculations on every single vertex of the object. The next bit Is happening in a separate program, but still on your graphics hardware in a little program called a fragment shader. Now that's also called a pixel shader which I think is a lot clearer. Because what it does is essentially performs a calculation for every pixel of the final image. It's called the fragment shader really because at the point at which you're performing the calculations, they aren't pixels yet. They're the things that are about to become pixels, and those things that are about to become pixels are called fragments. So the fragment shader will do probably the lighting, though as I said it might happen in a vertex shader. But modern advanced lighting effects tend to happen on fragment shader, and the texturing and anything to do with the coloring of the image. So, we've got this long pipeline but most of it is done on this dedicated hardware, it's extremely parallel, it's extremely fast. So, even though your graphics can be really very complicated, the drawing of them can actually be quite fast. Though it's still worth remembering that your GPU has limits, and so if you have vast numbers of polygons and huge high-resolution textures, you're still going to slow it down. And that actually can become quite an important issue in virtual reality. But nonetheless, GPU is great because they've really enabled us to do the kind of high quality graphics that we've known to expect now. [MUSIC]