Monthly Archives: October 2015
Example 02.01: Diffuse Color Mapping
In the previous examples we had an object without a color of it’s own, we just used the color of the light to make it blue. So one of the first things I wanted to investigate next was how to … Continue reading
Example 01.04: Phong reflection model – specular lighting
It’s finally time to implement the specular lighting part of the shader and hopefully get something resembling the wikipedia article. Figure 1. The different components of the Phong equation Specular reflection is the mirror-like reflection you get on shiny surfaces, … Continue reading
Example 01.03: Phong reflection model – diffuse lighting
After the basic ambient lighting factor from the previous example, we are now actually going to apply some shading to our model. The diffuse lighting component we will implement assumes we are describing a perfect matte surface that scatters the incoming … Continue reading
Example 01.02: Phong reflection model – ambient lighting
We’ll start of with what I call an arbitrary ‘smudge’ factor: Ambient lighting. This represents the light in the scene that is scattered of nearby objects and uniformly lits our object. We just assume that the light has bounced around … Continue reading