2021-01-18 08:13:52 +00:00
|
|
|
#version 450
|
2022-05-24 15:17:57 +00:00
|
|
|
#extension GL_GOOGLE_include_directive : enable
|
2023-01-22 10:23:15 +00:00
|
|
|
#extension GL_EXT_multiview : enable
|
2022-05-24 15:17:57 +00:00
|
|
|
|
|
|
|
#include "entity.h"
|
2021-01-18 08:13:52 +00:00
|
|
|
|
2022-11-21 11:02:18 +00:00
|
|
|
layout (set = 0, binding = 0) uniform
|
|
|
|
#include "matrices.h"
|
|
|
|
;
|
2021-01-18 08:13:52 +00:00
|
|
|
|
2022-05-24 15:17:57 +00:00
|
|
|
layout (set = 1, binding = 0) buffer Entities {
|
|
|
|
Entity entities[];
|
2021-01-18 08:13:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
layout (location = 0) in vec4 vertex;
|
|
|
|
layout (location = 1) in vec4 tl_uv;
|
2022-05-24 15:17:57 +00:00
|
|
|
layout (location = 2) in uint entid;
|
2021-01-18 08:13:52 +00:00
|
|
|
|
|
|
|
layout (location = 0) out vec4 tl_st;
|
2021-01-19 16:25:54 +00:00
|
|
|
layout (location = 1) out vec3 direction;
|
2022-05-26 23:12:21 +00:00
|
|
|
layout (location = 2) out vec4 color;
|
2021-01-18 08:13:52 +00:00
|
|
|
|
|
|
|
void
|
|
|
|
main (void)
|
|
|
|
{
|
2022-05-24 15:17:57 +00:00
|
|
|
vec3 vert = vertex * entities[entid].transform;
|
2023-01-22 10:23:15 +00:00
|
|
|
gl_Position = Projection3d * (View[gl_ViewIndex] * vec4 (vert, 1));
|
2021-01-23 11:42:53 +00:00
|
|
|
direction = (Sky * vertex).xyz;
|
2021-01-18 08:13:52 +00:00
|
|
|
tl_st = tl_uv;
|
2022-05-26 23:12:21 +00:00
|
|
|
color = entities[entid].color;
|
2021-01-18 08:13:52 +00:00
|
|
|
}
|