diff --git a/screenshot/DrawText.png b/screenshot/DrawText.png new file mode 100644 index 0000000..1390bb7 Binary files /dev/null and b/screenshot/DrawText.png differ diff --git a/shader/FlatAlphaTexture.frag b/shader/FlatAlphaTexture.frag new file mode 100644 index 0000000..9459860 --- /dev/null +++ b/shader/FlatAlphaTexture.frag @@ -0,0 +1,18 @@ +#version 450 core + +layout(binding = 2) uniform sampler2D tex; + +layout(location = 0) in vec2 FragmentTexCoord; +layout(location = 0) out vec4 FragColor; + +layout(binding = 1) uniform ColorMaterial +{ + vec4 color; +} color_material; + +void main() +{ + float alpha=texture(tex,FragmentTexCoord).r; + + FragColor=vec4(color_material.color.rgb,color_material.color.a*alpha); +} diff --git a/shader/FlatLumTexture.frag b/shader/FlatLumTexture.frag new file mode 100644 index 0000000..4c5117d --- /dev/null +++ b/shader/FlatLumTexture.frag @@ -0,0 +1,18 @@ +#version 450 core + +layout(binding = 2) uniform sampler2D tex; + +layout(location = 0) in vec2 FragmentTexCoord; +layout(location = 0) out vec4 FragColor; + +layout(binding = 1) uniform ColorMaterial +{ + vec4 color; +} color_material; + +void main() +{ + float lum=texture(tex,FragmentTexCoord).r; + + FragColor=vec4(color_material.color.rgb*lum,color_material.color.a); +}