Rasterizer for the University of Bristol Computer Graphics course (course work 2), links with the Ray Tracer.
See the report for a full overview.
- Download a copy of GLM and place it inside of the root directory.
- Then use Makefile to build the program by running the following command in the directory.
make
- A rendered image of the Cornell Box should appear.
Basic components of a rasteriser were implemented along with the following extensions:
- Optimisations
- Shadows
- Soft Shadows
- Interpolation Changes & Basic Clipping
- Anti-Aliasing - FXAA
- Parallelisation - GPU
- Frame buffer and Deferred Rendering
- Directional Lights - Light as a Camera
Four clips show the rasteriser in action:
- 50 shadow samples CPU vs GPU
- 2048 * 2048 CPU vs GPU
- 3 Soft Shadow Samples GPU
- 25 Soft Shadow Samples, 2048 * 2048 Shadow Map GPU
- Get a GLM folder and the correct version of SDL, we are using SDL 1.2.5.
- Place
glm
folder inside of Source, for ease - Extract SDL contents and place
include
andlib
folders inside of a directory you can remember, e.g. I have mine atc:\vs_lib
. - Take SDL.dll and place it into your project Source folder also (we are gonna move it in a sec)
- Okay now we are ready to open VS (File -> New -> Create new project from Source -> Console app -> Select directory where you have cloned this repo)
- When its loaded, rightclick project name (not solution) and select properties
In Properties change these 3 sections (I have chosen for DEBUG: x64)
- VC++ Directories
- Include Directories, add
c:\vs_lib\include
- Library Directories, add
c:\vs_lib\lib
- Include Directories, add
- C/C++
- Additional Include Directories, add the location of your GLM folder, e.g.
C:\Users\harrymt\Documents\GitHub\ray_tracer\Source\glm
- Additional Include Directories, add the location of your GLM folder, e.g.
- Linked
- Input,
SDL.lib;SDLmain.lib;
- Input,
- Based on this tutorial: (google lazyfoo SDL 1.2)
- For GLM: http://stackoverflow.com/questions/17905794/how-to-setup-the-glm-library-in-visual-studio-2012
Uses the following technologies: