Added direct diffuse lighting.

This commit is contained in:
2016-12-26 19:14:21 -04:00
parent 9ad63d489a
commit d48e8e0ba3
11 changed files with 566 additions and 154 deletions

View File

@@ -112,6 +112,12 @@ int main(int argc, char ** argv) {
figures.push_back(static_cast<Figure *>(p));
l = new Light();
l->m_position = normalize(vec3(1.0f, 1.0f, 1.0f));
lights.push_back(l);
l = new Light();
l->m_position = normalize(vec3(-1.0f, 0.0f, 0.0f));
l->m_diffuse = vec3(1.0f, 1.0f, 0.0f);
lights.push_back(l);
tracer = Tracer(g_h, g_w, g_fov);