Well, this is becoming a big subject of debate and even flamewar even on a CEO scale [remember Intel and nVidia ?
]. Well, being involved with this stuff for a good time [I have been programming on OpenGL for some years and have programmed a primitive Raytracer at the least], I hope I will be able to explain a bit of this stuff here.
Rasterizer
Well, rasterizer has been around for a LONG time and has been the prime method of producing 3D Graphics on home computers. To put it easily, a rasterizer first starts by associating spacial [as in space] information with the vistuals [vertices and surfaces] – part that is done by the vertex shader, throws up or cuts the data according to the viewing and camera information [clipping and viewing transformation], and then converting the visual parts to pixels [rasterization] and doing some shading/coloring on them [pixel or fragment shader]. Now to explain this stuff in further detail :
The shapes and “meshes” and it’s associated information like texture [the image you put as a skin on the object] enter what is called “the rendering pipeline”, each vertex is associated with a position, a color and some other information we don’t care about at the moment. Now each of the vertices is fed to the “Vertex Shader”, they set the final position and the color and some other information, either by the code [if the shader is programmed], or the “fixed functionality”. The “Geometry shader” the recent part introduced by the infamous DirectX 10, deals with how these objects are connected to each other [for example three vertices can form a triangle] and can output a number of shapes depending on how it is configured. All the shapes will be broken down to triangles before entering the rasterization section in the current implementation. In rasterization, the triangle’s surface is broken down to the would-be-pixels/fragments, the closest one is kept and interpolated values [For example if two of the vertices marking a triangle is red and one is blue, you will see a kind of gradient thing between them] from the Vertex/Geometry shading is passed to the Pixel Shader, and the pixel is colored, with the Pixel Shader Code or the fixed functionality, and is finally outputted to the framebuffer.
This is pretty much the main skeleton of that is being done on the shader.
Now this system can be implemented [and has already been] on the hardware, and we have hundreds of Rasterizers around us (start from home PC’s to even those mobile phones that have 3D Games on them). However things get trickier when the lighting is involved. For example the main method of Rasterization, has no way to calculate shadows, and we have to use various techniques to do it, and lots of extra work if we want to make it look better. Overall, let’s say efficient and easy as the Rasterizer might be, it is not a very good approximation of what we see in the real world.
To be continued… Hopefully.
Tags: Computer Graphics, Rasterizer