mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-27 22:52:21 +00:00
ba6450d0b4
Short wrappers for Draw functins are in vid_render_vulkan.c so the vulkan context can be passed on to the actual functions. The 2D shaders are set up similar to those in glsl, but with full 32-bit color (rgba) support instead of paletted. However, the textures are not loaded yet, nor is anything bound.
19 lines
314 B
GLSL
19 lines
314 B
GLSL
#version 450
|
|
|
|
layout (set = 0, binding = 1) uniform sampler2D Texture;
|
|
|
|
layout (location = 0) in vec2 st;
|
|
layout (location = 1) in vec4 color;
|
|
|
|
layout (location = 0) out vec4 frag_color;
|
|
|
|
void
|
|
main (void)
|
|
{
|
|
vec4 pix;
|
|
|
|
pix = texture (Texture, st);
|
|
if (pix.a < 0.5)
|
|
discard;
|
|
frag_color = pix * color;
|
|
}
|