* does not dead-code our inputs.
*/
VkShaderModule vsm = GLSL_VK_SHADER_MODULE(device, VERTEX,
- in vec3 a_pos;
- in vec4 a_color;
- flat out vec4 v_color;
+ layout(location = 0) in vec3 a_pos;
+ layout(location = 1) in vec4 a_color;
+ layout(location = 0) flat out vec4 v_color;
void main()
{
v_color = a_color;
);
VkShaderModule fsm = GLSL_VK_SHADER_MODULE(device, FRAGMENT,
- out vec4 f_color;
- flat in vec4 v_color;
+ layout(location = 0) out vec4 f_color;
+ layout(location = 0) flat in vec4 v_color;
void main()
{
f_color = v_color;
* does not dead-code our inputs.
*/
VkShaderModule vsm = GLSL_VK_SHADER_MODULE(device, VERTEX,
- in vec2 a_pos;
- in vec2 a_tex_coord;
- out vec4 v_tex_coord;
+ layout(location = 0) in vec2 a_pos;
+ layout(location = 1) in vec2 a_tex_coord;
+ layout(location = 0) out vec4 v_tex_coord;
void main()
{
v_tex_coord = vec4(a_tex_coord, 0, 1);
);
VkShaderModule fsm_2d = GLSL_VK_SHADER_MODULE(device, FRAGMENT,
- out vec4 f_color;
- in vec4 v_tex_coord;
+ layout(location = 0) out vec4 f_color;
+ layout(location = 0) in vec4 v_tex_coord;
layout(set = 0, binding = 0) uniform sampler2D u_tex;
void main()
{
);
VkShaderModule fsm_3d = GLSL_VK_SHADER_MODULE(device, FRAGMENT,
- out vec4 f_color;
- in vec4 v_tex_coord;
+ layout(location = 0) out vec4 f_color;
+ layout(location = 0) in vec4 v_tex_coord;
layout(set = 0, binding = 0) uniform sampler3D u_tex;
void main()
{