Added text overlay class to base folder
This commit is contained in:
parent
b34de6be7f
commit
33915ac557
6 changed files with 711 additions and 0 deletions
2
data/shaders/base/generate-spirv.bat
Normal file
2
data/shaders/base/generate-spirv.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
glslangvalidator -V textoverlay.vert -o textoverlay.vert.spv
|
||||
glslangvalidator -V textoverlay.frag -o textoverlay.frag.spv
|
||||
13
data/shaders/base/textoverlay.frag
Normal file
13
data/shaders/base/textoverlay.frag
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#version 450 core
|
||||
|
||||
layout (location = 0) in vec2 inUV;
|
||||
|
||||
layout (binding = 0) uniform sampler2D samplerFont;
|
||||
|
||||
layout (location = 0) out vec4 outFragColor;
|
||||
|
||||
void main(void)
|
||||
{
|
||||
float color = texture(samplerFont, inUV).r;
|
||||
outFragColor = vec4(vec3(color), 1.0);
|
||||
}
|
||||
BIN
data/shaders/base/textoverlay.frag.spv
Normal file
BIN
data/shaders/base/textoverlay.frag.spv
Normal file
Binary file not shown.
17
data/shaders/base/textoverlay.vert
Normal file
17
data/shaders/base/textoverlay.vert
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#version 450 core
|
||||
|
||||
layout (location = 0) in vec2 inPos;
|
||||
layout (location = 1) in vec2 inUV;
|
||||
|
||||
layout (location = 0) out vec2 outUV;
|
||||
|
||||
out gl_PerVertex
|
||||
{
|
||||
vec4 gl_Position;
|
||||
};
|
||||
|
||||
void main(void)
|
||||
{
|
||||
gl_Position = vec4(inPos, 0.0, 1.0);
|
||||
outUV = inUV;
|
||||
}
|
||||
BIN
data/shaders/base/textoverlay.vert.spv
Normal file
BIN
data/shaders/base/textoverlay.vert.spv
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue