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: