2021-04-24 01:40:39 +00:00
|
|
|
#version 450
|
2022-05-24 15:17:57 +00:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
2021-04-24 01:40:39 +00:00
|
|
|
|
2022-05-24 15:17:57 +00:00
|
|
|
#include "entity.h"
|
|
|
|
|
|
|
|
layout (set = 1, binding = 0) buffer Entities {
|
|
|
|
Entity entities[];
|
2021-04-24 01:40:39 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout (location = 0) in vec4 vertex;
|
2022-05-24 15:17:57 +00:00
|
|
|
layout (location = 2) in uint entid;
|
2021-04-24 01:40:39 +00:00
|
|
|
|
|
|
|
layout (location = 0) out int InstanceIndex;
|
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
2022-05-24 15:17:57 +00:00
|
|
|
vec3 vert = vertex * entities[entid].transform;
|
|
|
|
gl_Position = vec4 (vert, 1);;
|
2021-04-24 01:40:39 +00:00
|
|
|
InstanceIndex = gl_InstanceIndex;
|
|
|
|
}
|