Index: README.txt
===================================================================
--- README.txt	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ README.txt	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -87,7 +87,5 @@
 Download the vulkan sdk (make sure VULKAN_SDK_PATH in the makefile points to it)
 
-brew install sdl2
-brew install sdl2_image
-brew install sdl2_ttf
+brew install sdl2 sdl2_image sdl2_ttf
 
 make vulkangame && ./vulkangame
Index: compile.sh
===================================================================
--- compile.sh	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ compile.sh	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -12,4 +12,15 @@
 echo $VULKAN_SDK_PATH
 
-$VULKAN_SDK_PATH/bin/glslangValidator -V shader.vert
-$VULKAN_SDK_PATH/bin/glslangValidator -V shader.frag
+shopt -s nullglob
+shopt -s extglob
+
+FILES=./!(*.spv)
+
+for f in $FILES
+do
+   shaderName=$(echo $f | sed 's/\.\/\(.*\)\..*/\1/')
+   shaderType=$(echo $f | sed 's/\.\/.*\.\(.*\)/\1/')
+   fOut="$shaderName-$shaderType.spv"
+
+   $VULKAN_SDK_PATH/bin/glslangValidator -V $f -o $fOut
+done
Index: makefile
===================================================================
--- makefile	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ makefile	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -56,5 +56,5 @@
 
 .PHONY: shaders
-shaders: shaders/shader.vert shaders/shader.frag
+shaders:
 	cd shaders && ../compile.sh && cd ..
 
Index: shaders/overlay.frag
===================================================================
--- shaders/overlay.frag	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
+++ shaders/overlay.frag	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -0,0 +1,19 @@
+#version 450
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(binding = 1) uniform sampler2D texSampler;
+layout(binding = 2) uniform sampler2D uiTexSampler;
+
+layout(location = 0) in vec3 fragColor;
+layout(location = 1) in vec2 fragTexCoord;
+layout(location = 2) flat in uint isOverlay;
+
+layout(location = 0) out vec4 outColor;
+
+void main() {
+   if (isOverlay == 1) {
+      outColor = texture(uiTexSampler, fragTexCoord);
+   } else {
+      outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
+   }
+}
Index: shaders/overlay.vert
===================================================================
--- shaders/overlay.vert	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
+++ shaders/overlay.vert	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -0,0 +1,30 @@
+#version 450
+#extension GL_ARB_separate_shader_objects : enable
+
+layout (binding = 0) uniform UniformBufferObject {
+   mat4 model;
+   mat4 view;
+   mat4 proj;
+} ubo;
+
+layout(location = 0) in vec3 inPosition;
+layout(location = 1) in vec3 inColor;
+layout(location = 2) in vec2 inTexCoord;
+
+layout(location = 0) out vec3 fragColor;
+layout(location = 1) out vec2 fragTexCoord;
+layout(location = 2) out uint isOverlay;
+
+void main() {
+   if (gl_VertexIndex < 8) {
+      gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
+      fragColor = inColor;
+      isOverlay = 0;
+   } else {
+      gl_Position = vec4(inPosition, 1.0);
+      fragColor = vec3(1.0, 1.0, 1.0);
+      isOverlay = 1;
+   }
+
+   fragTexCoord = inTexCoord;
+}
Index: shaders/scene.frag
===================================================================
--- shaders/scene.frag	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
+++ shaders/scene.frag	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -0,0 +1,19 @@
+#version 450
+#extension GL_ARB_separate_shader_objects : enable
+
+layout(binding = 1) uniform sampler2D texSampler;
+layout(binding = 2) uniform sampler2D uiTexSampler;
+
+layout(location = 0) in vec3 fragColor;
+layout(location = 1) in vec2 fragTexCoord;
+layout(location = 2) flat in uint isOverlay;
+
+layout(location = 0) out vec4 outColor;
+
+void main() {
+   if (isOverlay == 1) {
+      outColor = texture(uiTexSampler, fragTexCoord);
+   } else {
+      outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
+   }
+}
Index: shaders/scene.vert
===================================================================
--- shaders/scene.vert	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
+++ shaders/scene.vert	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -0,0 +1,30 @@
+#version 450
+#extension GL_ARB_separate_shader_objects : enable
+
+layout (binding = 0) uniform UniformBufferObject {
+   mat4 model;
+   mat4 view;
+   mat4 proj;
+} ubo;
+
+layout(location = 0) in vec3 inPosition;
+layout(location = 1) in vec3 inColor;
+layout(location = 2) in vec2 inTexCoord;
+
+layout(location = 0) out vec3 fragColor;
+layout(location = 1) out vec2 fragTexCoord;
+layout(location = 2) out uint isOverlay;
+
+void main() {
+   if (gl_VertexIndex < 8) {
+      gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
+      fragColor = inColor;
+      isOverlay = 0;
+   } else {
+      gl_Position = vec4(inPosition, 1.0);
+      fragColor = vec3(1.0, 1.0, 1.0);
+      isOverlay = 1;
+   }
+
+   fragTexCoord = inTexCoord;
+}
Index: aders/shader.frag
===================================================================
--- shaders/shader.frag	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ 	(revision )
@@ -1,19 +1,0 @@
-#version 450
-#extension GL_ARB_separate_shader_objects : enable
-
-layout(binding = 1) uniform sampler2D texSampler;
-layout(binding = 2) uniform sampler2D uiTexSampler;
-
-layout(location = 0) in vec3 fragColor;
-layout(location = 1) in vec2 fragTexCoord;
-layout(location = 2) flat in uint isOverlay;
-
-layout(location = 0) out vec4 outColor;
-
-void main() {
-   if (isOverlay == 1) {
-      outColor = texture(uiTexSampler, fragTexCoord);
-   } else {
-      outColor = vec4(fragColor * texture(texSampler, fragTexCoord).rgb, 1.0);
-   }
-}
Index: aders/shader.vert
===================================================================
--- shaders/shader.vert	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ 	(revision )
@@ -1,30 +1,0 @@
-#version 450
-#extension GL_ARB_separate_shader_objects : enable
-
-layout (binding = 0) uniform UniformBufferObject {
-   mat4 model;
-   mat4 view;
-   mat4 proj;
-} ubo;
-
-layout(location = 0) in vec3 inPosition;
-layout(location = 1) in vec3 inColor;
-layout(location = 2) in vec2 inTexCoord;
-
-layout(location = 0) out vec3 fragColor;
-layout(location = 1) out vec2 fragTexCoord;
-layout(location = 2) out uint isOverlay;
-
-void main() {
-   if (gl_VertexIndex < 8) {
-      gl_Position = ubo.proj * ubo.view * ubo.model * vec4(inPosition, 1.0);
-      fragColor = inColor;
-      isOverlay = 0;
-   } else {
-      gl_Position = vec4(inPosition, 1.0);
-      fragColor = vec3(1.0, 1.0, 1.0);
-      isOverlay = 1;
-   }
-
-   fragTexCoord = inTexCoord;
-}
Index: vulkan-game.cpp
===================================================================
--- vulkan-game.cpp	(revision ad31ec78d091dca73c4c327ded5d45b1480a5225)
+++ vulkan-game.cpp	(revision c8c6da81cef243ff820763829abe316ce3d2e34a)
@@ -164,4 +164,5 @@
    private:
       GameGui* gui = new GameGui_SDL();
+      SDL_version sdlVersion;
       SDL_Window* window = nullptr;
 
@@ -260,5 +261,16 @@
          }
 
-         uiOverlay = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH, SCREEN_HEIGHT);
+         SDL_VERSION(&sdlVersion);
+
+         // In SDL 2.0.10 (currently, the latest), SDL_TEXTUREACCESS_TARGET is required to get a transparent overlay working
+         // However, the latest SDL version available through homebrew on Mac is 2.0.9, which requires SDL_TEXTUREACCESS_STREAMING
+         // I tried building sdl 2.0.10 (and sdl_image and sdl_ttf) from source on Mac, but had some issues, so this is easier
+         // until the homebrew recipe is updated
+         if (sdlVersion.major == 2 && sdlVersion.minor == 0 && sdlVersion.patch == 9) {
+            uiOverlay = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_STREAMING, SCREEN_WIDTH, SCREEN_HEIGHT);
+         } else {
+            uiOverlay = SDL_CreateTexture(gRenderer, SDL_PIXELFORMAT_RGBA8888, SDL_TEXTUREACCESS_TARGET, SCREEN_WIDTH, SCREEN_HEIGHT);
+         }
+
          if (uiOverlay == nullptr) {
             cout << "Unable to create blank texture! SDL Error: " << SDL_GetError() << endl;
@@ -1833,6 +1845,6 @@
          createRenderPass();
 
-         createGraphicsPipeline("shaders/vert.spv", "shaders/frag.spv", scenePipeline);
-         createGraphicsPipeline("shaders/vert.spv", "shaders/frag.spv", overlayPipeline);
+         createGraphicsPipeline("shaders/scene-vert.spv", "shaders/scene-frag.spv", scenePipeline);
+         createGraphicsPipeline("shaders/overlay-vert.spv", "shaders/overlay-frag.spv", overlayPipeline);
 
          createDepthResources();
