Skip to content
This repository has been archived by the owner on Jul 14, 2021. It is now read-only.

pouyakary/basic-gouraud-shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gouraud Shader

This is a basic Gouraud Shader based on Henri Gouraud's original paper; "Continues Shading of Curvad Surfaces". It only does it on one surface in a 2D environment as a hobby project, I'm going to write a full global illuminiation ray tracer and the right implementation will be there.

Gallery

This is the normal shader. Both of the bottom sides are black and therefore the top color gates faded through the edges:

The original gouraud shader

This is if you change the volume_a and volume_b in the combine_colors function and set pure red, green and blue as light sources:

Building

You must have LLVM or GCC on your system with support of C++11 at least. Also you must make sure you have OpenGL and GLUT installed on your system. GNU Make is also needed. Then you can simply run:

% make run