Index: makefile
===================================================================
--- makefile	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ makefile	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -59,6 +59,6 @@
 	$(CC) $(CXX_FLAGS) -o $@ $^ $(LIB_FLAGS) -DGAMEGUI_INCLUDE_VULKAN
 
-SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp game-gui-sdl.cpp
-HEADER_FILES = vulkan-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp game-gui-sdl.hpp game-gui.hpp graphics-pipeline_vulkan.hpp
+SRC_FILES = main-vulkan.cpp vulkan-game.cpp crash-logger.cpp logger.cpp vulkan-utils.cpp utils.cpp game-gui-sdl.cpp
+HEADER_FILES = vulkan-game.hpp crash-logger.hpp logger.hpp vulkan-utils.hpp utils.hpp game-gui-sdl.hpp game-gui.hpp graphics-pipeline_vulkan.hpp
 
 vulkangame: $(SRC_FILES) $(HEADER_FILES)
Index: scene-notes.txt
===================================================================
--- scene-notes.txt	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ scene-notes.txt	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -2,3 +2,13 @@
 In vulkan, it is upper left, so I set the projection matrix [1][1] cell to -1 to flip the y-axis and make it match opengl
 
-+z goes into the screen (in Vulkan)
+depth ranges ([-1, 1] in OpenGL, [0, 1] in Vulkan)
+
+Vulkan coordinates:
+X+ points toward right
+Y+ points toward down (but I flip it in vulkangame in the perspective matrix to point up)
+Z+ points toward inside the screen
+
+In opengl, all 3 coordinates range from -1 to 1
+
+For the perspective matrix, after the vertex shader finishes, the x, y, and z of the final point are automatically divided
+by the w. For testing the projection matrix in the console, I could do that manually as well.
Index: shaders/ship.frag
===================================================================
--- shaders/ship.frag	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ shaders/ship.frag	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -6,6 +6,7 @@
 layout(location = 2) in vec3 normal_eye;
 layout(location = 3) in vec3 light_position_eye;
+layout(location = 4) in vec3 light2_position_eye;
 
-layout(location = 0) out vec4 outColor;
+layout(location = 0) out vec4 frag_color;
 
 // fixed point light properties
@@ -34,4 +35,10 @@
    vec3 Id = Ld * Kd * dot_prod;
 
+  vec3 direction_to_light2_eye = normalize(light2_position_eye - position_eye);
+  float dot_prod2 = max(dot(direction_to_light2_eye, normal_eye), 0.0);
+
+  // diffuse intensity
+  vec3 Id2 = Ld * Kd * dot_prod2;
+
    vec3 surface_to_viewer_eye = normalize(-position_eye);
 
@@ -43,4 +50,11 @@
    vec3 Is = Ls * Ks * specular_factor;
 
-   outColor = vec4(Is + Id + Ia, 1.0);
+   vec3 reflection_eye2 = reflect(-direction_to_light2_eye, normal_eye);
+   float dot_prod_specular2 = max(dot(reflection_eye2, surface_to_viewer_eye), 0.0);
+   float specular_factor2 = pow(dot_prod_specular2, specular_exponent);
+
+   // specular intensity
+   vec3 Is2 = Ls * Ks * specular_factor2;
+
+   frag_color = vec4((Is + Id + Ia + Is2 + Id2 + Ia2)/2, 1.0);
 }
Index: shaders/ship.vert
===================================================================
--- shaders/ship.vert	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ shaders/ship.vert	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -24,24 +24,25 @@
 layout(location = 2) out vec3 normal_eye;
 layout(location = 3) out vec3 light_position_eye;
+layout(location = 4) out vec3 light2_position_eye;
 
-// fixed point light position
+// fixed point light positions
 //vec3 light_position_world = vec3(0.0, 0.0, 2.0);
-//vec3 light_position_world = vec3(0.4, 1.5, 0.8);
-vec3 light_position_world = vec3(0.4, 0.0, 0.2);
+//vec3 light2_position_world = vec3(0.0, 1.5, -0.1);
+vec3 light_position_world = vec3(7.0, -7.0, -10.0);
+vec3 light2_position_world = vec3(4.0, -3.0, -10.0);
 
 // TODO: This does not account for scaling in the model matrix
 // Check Anton's book to see how to fix this
 void main() {
-   //position_eye = vec3(ubo.view * sbo.objects[obj_index].model * vec4(vertex_position, 1.0));
-   position_eye = vec3(vec4(vertex_position, 1.0));
+   position_eye = vec3(ubo.view * sbo.objects[obj_index].model * vec4(vertex_position, 1.0));
 
    // Using 0.0 instead of 1.0 means translations won't effect the normal
-   //normal_eye = normalize(vec3(ubo.view * sbo.objects[obj_index].model * vec4(vertex_normal, 0.0)));
-   normal_eye = normalize(vec3(vec4(vertex_normal, 0.0)));
+   normal_eye = normalize(vec3(ubo.view * sbo.objects[obj_index].model * vec4(vertex_normal, 0.0)));
+
    color = vertex_color;
-   //light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0));
-   light_position_eye = vec3(vec4(light_position_world, 1.0));
 
-   //gl_Position = ubo.proj * vec4(position_eye, 1.0);
-   gl_Position = vec4(vertex_position, 1.0);
+   light_position_eye = vec3(ubo.view * vec4(light_position_world, 1.0));
+   light2_position_eye = vec3(ubo.view * vec4(light2_position_world, 1.0));
+
+   gl_Position = ubo.proj * vec4(position_eye, 1.0);
 }
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ vulkan-game.cpp	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -1,6 +1,3 @@
 #include "vulkan-game.hpp"
-
-#define GLM_FORCE_RADIANS
-#define GLM_FORCE_DEPTH_ZERO_TO_ONE
 
 #include <array>
@@ -62,5 +59,4 @@
 
    initVulkan();
-   initMatrices();
    mainLoop();
    cleanup();
@@ -186,4 +182,6 @@
    createImageResources();
    createFramebuffers();
+
+   initMatrices();
 
    // TODO: Figure out how much of ubo creation and associated variables should be in the pipeline class
@@ -505,17 +503,17 @@
       addObjectIndex<ShipVertex>(shipPipeline.getObjects().size(),
       addVertexNormals<ShipVertex>({
-         {{  0.5f,  -0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-         {{ -0.5f,  -0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-         {{ -0.5f,   0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-         {{  0.5f,  -0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-         {{ -0.5f,   0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-         {{  0.5f,   0.5f,   0.5f}, {0.0f, 0.6f, 0.0f}},
-
-         {{  0.3f,  -0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
-         {{ -0.3f,  -0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
-         {{ -0.3f,   0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
-         {{  0.3f,  -0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
-         {{ -0.3f,   0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
-         {{  0.3f,   0.3f,   0.3f}, {0.0f, 0.0f, 0.7f}},
+         {{  40.0f,   40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
+         {{ -40.0f,   40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
+         {{ -40.0f,  -40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
+         {{  40.0f,   40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
+         {{ -40.0f,  -40.0f,  80.0f}, {0.0f, 0.6f, 0.0f}},
+         {{  40.0f,  -40.0f,  72.0f}, {0.0f, 0.6f, 0.0f}},
+
+         {{   8.0f,    8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
+         {{  -8.0f,    8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
+         {{  -8.0f,   -8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
+         {{   8.0f,    8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
+         {{  -8.0f,   -8.0f,  30.0f}, {0.0f, 0.0f, 0.7f}},
+         {{   8.0f,   -8.0f,  34.0f}, {0.0f, 0.0f, 0.7f}},
       })), {
          0,   1,   2,   3,   4,   5,
@@ -551,5 +549,5 @@
 
    float cam_yaw = 0.0f;
-   float cam_pitch = -50.0f;
+   float cam_pitch = 0.0f; // -50.0f;
 
    mat4 yaw_mat = rotate(mat4(1.0f), radians(-cam_yaw), vec3(0.0f, 1.0f, 0.0f));
Index: vulkan-game.hpp
===================================================================
--- vulkan-game.hpp	(revision 7c929fc6d7d0bbc80ddc3d72e89c0c4601e4cecc)
+++ vulkan-game.hpp	(revision 60578ce4dcc921e61972a900007888a9a06964ea)
@@ -1,4 +1,8 @@
 #ifndef _VULKAN_GAME_H
 #define _VULKAN_GAME_H
+
+#define GLM_FORCE_RADIANS
+#define GLM_FORCE_DEPTH_ZERO_TO_ONE // Since, in Vulkan, the depth range is 0 to 1 instead of -1 to 1
+#define GLM_FORCE_LEFT_HANDED
 
 #include <glm/glm.hpp>
@@ -57,5 +61,5 @@
       const float NEAR_CLIP = 0.1f;
       const float FAR_CLIP = 100.0f;
-      const float FOV_ANGLE = 67.0f;
+      const float FOV_ANGLE = 67.0f; // means the camera lens goes from -33 deg to 33 def
 
       vec3 cam_pos;
@@ -203,6 +207,6 @@
       vec3 p3 = vertices[i+2].pos;
 
-      vec3 normal = normalize(cross(p2 - p1, p3 - p1));
-      //normal.z = -normal.z;
+      // flip the y axis so that +y points up
+      vec3 normal = -normalize(cross(p2 - p1, p3 - p1));
 
       // Add the same normal for all 3 vertices
