[vulkan] Remove superfluous glyph fragment shader

The main reason I had created in the first place was I hadn't thought of
using image view swizzles to handle coverage-alpha textures (for
monochrome glyphs), and for whatever reason also had the texture in a
different binding slot to the twod fragment shader. With both issues out
of the way, there's no reason to have an almost identical (just some
naming) shader just for glyphs.
This commit is contained in:
Bill Currie 2023-01-05 13:34:52 +09:00
parent 37b6d4da7e
commit 3da90b612f
4 changed files with 2 additions and 27 deletions

View file

@ -285,8 +285,6 @@ slice_src = $(vkshaderpath)/slice.vert
slice_c = $(vkshaderpath)/slice.vert.spvc
glyphv_src = $(vkshaderpath)/glyph.vert
glyphv_c = $(vkshaderpath)/glyph.vert.spvc
glyphf_src = $(vkshaderpath)/glyph.frag
glyphf_c = $(vkshaderpath)/glyph.frag.spvc
linev_src = $(vkshaderpath)/line.vert
linev_c = $(vkshaderpath)/line.vert.spvc
linef_src = $(vkshaderpath)/line.frag
@ -373,7 +371,6 @@ waterwarp_c = $(vkshaderpath)/waterwarp.frag.spvc
$(slice_vert_c): $(slice_vert_src) $(matrices_h)
$(glyphv_c): $(glyphv_src) $(matrices_h)
$(glyphf_c): $(glyphf_src)
$(linev_c): $(linev_src) $(matrices_h)
$(linef_c): $(linef_src)
@ -449,7 +446,6 @@ $(waterwarp_c): $(waterwarp_src) $(matrices_h)
vkshader_c = \
$(slice_c) \
$(glyphv_c) \
$(glyphf_c) \
$(linev_c) \
$(linef_c) \
$(partphysicsc_c) \
@ -535,7 +531,6 @@ EXTRA_DIST += \
$(entity_h) \
$(slice_src) \
$(glyphv_src) \
$(glyphf_src) \
$(linev_src) \
$(linef_src) \
$(partphysicsc_src) \

View file

@ -1190,7 +1190,7 @@
subpass = 0;
stages = (
{ stage = vertex; name = main; module = $builtin/slice.vert; },
{ stage = fragment; name = main; module = $builtin/glyph.frag; },
{ stage = fragment; name = main; module = $builtin/twod.frag; },
);
vertexInput = $properties.vertexInput.slice;
inputAssembly = {
@ -1211,7 +1211,7 @@
subpass = 0;
stages = (
{ stage = vertex; name = main; module = $builtin/glyph.vert; },
{ stage = fragment; name = main; module = $builtin/glyph.frag; },
{ stage = fragment; name = main; module = $builtin/twod.frag; },
);
vertexInput = $properties.vertexInput.glyph;
inputAssembly = {

View file

@ -43,8 +43,6 @@ static
static
#include "libs/video/renderer/vulkan/shader/glyph.vert.spvc"
static
#include "libs/video/renderer/vulkan/shader/glyph.frag.spvc"
static
#include "libs/video/renderer/vulkan/shader/line.vert.spvc"
static
#include "libs/video/renderer/vulkan/shader/line.frag.spvc"
@ -130,7 +128,6 @@ typedef struct shaderdata_s {
static shaderdata_t builtin_shaders[] = {
{ "slice.vert", slice_vert, sizeof (slice_vert) },
{ "glyph.vert", glyph_vert, sizeof (glyph_vert) },
{ "glyph.frag", glyph_frag, sizeof (glyph_frag) },
{ "line.vert", line_vert, sizeof (line_vert) },
{ "line.frag", line_frag, sizeof (line_frag) },
{ "particle.vert", particle_vert, sizeof (particle_vert) },

View file

@ -1,17 +0,0 @@
#version 450
layout (set = 1, binding = 0) uniform sampler2D Texture;
layout (location = 0) in vec2 uv;
layout (location = 1) in vec4 color;
layout (location = 0) out vec4 frag_color;
void
main (void)
{
vec4 pix;
pix = texture (Texture, uv);
frag_color = pix * color;
}