From a1e6dcc95e6e3c2f59fb909c3c479caa58f40e6b Mon Sep 17 00:00:00 2001 From: Anselme Date: Wed, 2 Dec 2015 10:44:21 +0100 Subject: [PATCH] some tiny changes --- CMakeLists.txt | 2 +- forward.frag | 4 ++-- forward.vert | 2 +- scene.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1117918..f5af1df 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -project(SparrowRenderer) +project(SparrowRenderer) cmake_minimum_required(VERSION 2.8) find_package(OpenGL REQUIRED) diff --git a/forward.frag b/forward.frag index 38b98dd..30d99a7 100644 --- a/forward.frag +++ b/forward.frag @@ -80,9 +80,9 @@ void main(void) { #endif #ifdef AMBIENT_LIGHT - outColor = vec4(ambient + lightColor*diffuse, 1); + outColor = vec4(ambient + lightColor*diffuse, 1); #else - vec3 light = phongLighting(diffuse, specular, materialNs, lightColor, normal, lightDirInView, halfVecInView); + vec3 light = phongLighting(diffuse, specular, materialNs, lightColor, normal, lightDirInView, halfVecInView); outColor = vec4(light, 1); #endif } diff --git a/forward.vert b/forward.vert index 3fefc81..b1d037c 100644 --- a/forward.vert +++ b/forward.vert @@ -43,7 +43,7 @@ void main(void) { #endif #ifdef POINT_LIGHT - lightDirInView = normalize(mat3(viewMatrix)*pointLight - posInView); + lightDirInView = normalize(viewMatrix*pointLight - posInView); halfVecInView = normalize(lightDirInView - posInView); #endif diff --git a/scene.h b/scene.h index 6751cbe..c067768 100644 --- a/scene.h +++ b/scene.h @@ -43,6 +43,7 @@ public: class ArrayScene : public Scene { +protected: std::vector lights; std::vector entities; public: