Converted debug_font shader to Vulkan glsl
This commit is contained in:
@@ -5,3 +5,5 @@ add_standard_asset(sprite.frag)
|
|||||||
add_standard_asset(sprite.vert)
|
add_standard_asset(sprite.vert)
|
||||||
add_standard_asset(vulkan_test.vert)
|
add_standard_asset(vulkan_test.vert)
|
||||||
add_standard_asset(vulkan_test.frag)
|
add_standard_asset(vulkan_test.frag)
|
||||||
|
add_standard_asset(debug_font.vert)
|
||||||
|
add_standard_asset(debug_font.frag)
|
||||||
|
|||||||
@@ -29,14 +29,14 @@
|
|||||||
// or implied, of Kearwood Gilbert.
|
// or implied, of Kearwood Gilbert.
|
||||||
//
|
//
|
||||||
|
|
||||||
out vec4 colorOut;
|
#version 450
|
||||||
|
|
||||||
in mediump vec2 textureCoordinate;
|
layout(location = 0) in mediump vec2 textureCoordinate;
|
||||||
|
layout(binding = 1) uniform sampler2D diffuseTexture;
|
||||||
uniform sampler2D diffuseTexture;
|
layout(location = 0) out vec4 outColor;
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 font_color = texture(diffuseTexture, textureCoordinate);
|
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);
|
||||||
}
|
}
|
||||||
@@ -29,15 +29,16 @@
|
|||||||
// or implied, of Kearwood Gilbert.
|
// or implied, of Kearwood Gilbert.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#version 450
|
||||||
|
|
||||||
out mediump vec2 textureCoordinate;
|
layout(location = 0) out mediump vec2 textureCoordinate;
|
||||||
|
layout(location = 0) in vec3 vertex_position;
|
||||||
in vec4 vertex_position;
|
layout(location = 1) in lowp vec2 vertex_uv;
|
||||||
in lowp vec2 vertex_uv;
|
|
||||||
uniform highp mat4 mvp_matrix; // mvp_matrix is the result of multiplying the model, view, and projection matrices
|
|
||||||
|
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
gl_Position = /*mvp_matrix * */vertex_position;
|
gl_Position = vec4(vertex_position, 1.0);
|
||||||
textureCoordinate = vertex_uv;
|
textureCoordinate = vertex_uv;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user