At DAE we were taught about the different ways to render objects to the screen. We first started off with programming a Software Raytracer that was able to draw geometric objects such as spheres, planes and triangles to the screen. After we were done with the Raytracer we made a software Rasterizer from scratch, teaching us how graphics cards really work. And for the end of the Semester we had to do work with the GPU to make triangles appear to the screen.
Raytracing
Our first assignment was to make a software Raytracer. A Raytracer renderer will shoot a mathematical ray out of the camera for each pixel it has to render. We can then check if the ray collides with any geometrical objects using some math formulas. We can then simulate lighting and shadows by tracing more rays towards the light sources. Each object also had a material/shader that determined how the object would appear on the screen. We implemented some PBR (physical based rendering) shaders to give the objects a realistic look.
At the end of this expensive operation we are presented with a realistic looking scene of some spheres and triangles.

Ray tracing meshes
We then took this to the next level and tried to render a group of triangles called a mesh. This would affect performance very drastically, so we added an acceleration structure in the form of a AABB (axis aligned bounding box) and used multithreading to speed up the process.

Software Rasterizer
Our next assignment was to create a Rasterizer using C++ code. This assignment taught us how GPUs really work as we had to implement the various stages of rasterization. From the Projection stage to the Rasterization stage to the pixel shading stage. We had to implement it all and write a Phong shader to go with it.

Hardware Rasterizer (GPU)
We then had to do the same assignment but with the GPU, teaching us the basics of working with DirectX and HLSL to create a Basic Phong Shader.
Both the software and hardware Rasterizer really put into perspective how the GPU works and how much is integrated into its hardware.


Leave a comment