diff --git a/standard_assets/shaders/CMakeLists.txt b/standard_assets/shaders/CMakeLists.txt index b9055b9..b84ae0e 100644 --- a/standard_assets/shaders/CMakeLists.txt +++ b/standard_assets/shaders/CMakeLists.txt @@ -5,3 +5,5 @@ add_standard_asset(sprite.frag) add_standard_asset(sprite.vert) add_standard_asset(vulkan_test.vert) add_standard_asset(vulkan_test.frag) +add_standard_asset(debug_font.vert) +add_standard_asset(debug_font.frag) diff --git a/standard_assets/shaders/debug_font_osx.fsh b/standard_assets/shaders/debug_font.frag similarity index 88% rename from standard_assets/shaders/debug_font_osx.fsh rename to standard_assets/shaders/debug_font.frag index a9566e8..0114edc 100644 --- a/standard_assets/shaders/debug_font_osx.fsh +++ b/standard_assets/shaders/debug_font.frag @@ -29,14 +29,14 @@ // or implied, of Kearwood Gilbert. // -out vec4 colorOut; +#version 450 -in mediump vec2 textureCoordinate; - -uniform sampler2D diffuseTexture; +layout(location = 0) in mediump vec2 textureCoordinate; +layout(binding = 1) uniform sampler2D diffuseTexture; +layout(location = 0) out vec4 outColor; void main() { vec4 font_color = texture(diffuseTexture, textureCoordinate); - colorOut = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50); + outColor = vec4(font_color.r, font_color.g, font_color.b, font_color.r + 0.50); } diff --git a/standard_assets/shaders/debug_font_osx.vsh b/standard_assets/shaders/debug_font.vert similarity index 84% rename from standard_assets/shaders/debug_font_osx.vsh rename to standard_assets/shaders/debug_font.vert index b4d5a3f..eec88b2 100644 --- a/standard_assets/shaders/debug_font_osx.vsh +++ b/standard_assets/shaders/debug_font.vert @@ -29,15 +29,16 @@ // or implied, of Kearwood Gilbert. // +#version 450 -out mediump vec2 textureCoordinate; - -in vec4 vertex_position; -in lowp vec2 vertex_uv; -uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices +layout(location = 0) out mediump vec2 textureCoordinate; +layout(location = 0) in vec3 vertex_position; +layout(location = 1) in lowp vec2 vertex_uv; void main() { - gl_Position = /*mvp_matrix * */vertex_position; - textureCoordinate = vertex_uv; + gl_Position = vec4(vertex_position, 1.0); + textureCoordinate = vertex_uv; } + +