summaryrefslogtreecommitdiff
path: root/shaders/shader.vert
blob: 181d1bd156cbf696c8fc99318a4fecbf33e24223 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#version 450

layout(location = 0) in vec3 in_position;
layout(location = 1) in vec3 in_normal;
layout(location = 2) in vec4 in_color;

layout(location = 0) out vec4 frag_color;

layout(set = 0, binding = 0) uniform mvp {
	mat4 model;
	mat4 view;
	mat4 proj;
	uint count;
} ubo;

layout(push_constant) uniform mesh_data {
	mat4 transform;
} mesh;

void main() {
	gl_Position = ubo.proj * ubo.view * ubo.model * mesh.transform * vec4(in_position, 1.0);
	frag_color = in_color;
}