From 018b14cc2048b84b4818aebbbd6d3d44835bb86f Mon Sep 17 00:00:00 2001 From: "Dmitry V. Sokolov" Date: Mon, 21 Jan 2019 00:57:35 +0100 Subject: [PATCH] Updated Home (markdown) --- Home.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Home.md b/Home.md index c04f651..1e7a878 100644 --- a/Home.md +++ b/Home.md @@ -136,8 +136,9 @@ The hardest part is over, and now our path is clear. If we know how to draw one -

Stage 4: lighting

+

Step 4: lighting

The image is perfect in all aspects, except for the lack of light. Throughout the rest of the article we will talk about lighting. Let's add few point light sources: + ```c++ struct Light { Light(const Vec3f &p, const float &i) : position(p), intensity(i) {} @@ -175,7 +176,7 @@ The dot product trick gives a good approximation of the illumination of matt sur Check how few modifications were necessary. In short, the brighter the light on the shiny surfaces, the less the angle between the view direction and the direction of reflected light. -This trickery with illumination of matt and shiny surfaces is known as Phong reflection model. The wiki has a fairly detailed description of this lighting model. It can be nice to read it side-by-side with the source code. Here is the key picture to understanding the magic: +This trickery with illumination of matt and shiny surfaces is known as Phong reflection model. The wiki has a fairly detailed description of this lighting model. It can be nice to read it side-by-side with the source code. Here is the key picture to understanding the magic:

Step 6: shadows