Add GEVulkanShaderManager

This commit is contained in:
Benau
2022-03-18 16:24:33 +08:00
parent 89afd214e8
commit cb607a16ff
10 changed files with 190 additions and 9 deletions

View File

@@ -0,0 +1,12 @@
layout(location = 0) in vec4 f_color;
layout(location = 1) in vec2 f_uv;
layout(location = 2) flat in int f_sampler_index;
layout(binding = 0) uniform sampler2D f_tex[SAMPLER_SIZE];
layout(location = 0) out vec4 o_color;
void main()
{
o_color = texture(f_tex[f_sampler_index], f_uv) * f_color;
}

View File

@@ -0,0 +1,16 @@
layout(location = 0) in vec2 v_position;
layout(location = 1) in vec4 v_color;
layout(location = 2) in vec2 v_uv;
layout(location = 3) in int v_sampler_index;
layout(location = 0) out vec4 f_color;
layout(location = 1) out vec2 f_uv;
layout(location = 2) flat out int f_sampler_index;
void main()
{
gl_Position = vec4(v_position, 0.0, 1.0);
f_color = v_color.zyxw;
f_uv = v_uv;
f_sampler_index = v_sampler_index;
}