From 5845642965a1eebaec3a1d1126445ecb459688b8 Mon Sep 17 00:00:00 2001 From: Jonathan Bradley Date: Wed, 8 Jan 2025 22:26:07 -0500 Subject: first-pass replace cmake with make --- assets/shaders/vertex.vert | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 assets/shaders/vertex.vert (limited to 'assets/shaders/vertex.vert') diff --git a/assets/shaders/vertex.vert b/assets/shaders/vertex.vert new file mode 100644 index 0000000..57fa219 --- /dev/null +++ b/assets/shaders/vertex.vert @@ -0,0 +1,31 @@ +#version 450 + +layout(binding = 0) uniform UniformBufferObject { + mat4 model; + mat4 view; + mat4 proj; +} ubo; + +// vertex +// layout(location = 0) in vec4 inColor; +layout(location = 0) in vec3 inPosition; +layout(location = 1) in vec3 inNorm; +layout(location = 2) in vec2 inUV; + +// instance +layout(location = 3) in mat4 instPosRotScale; + +// output +layout(location = 0) out vec4 fragColor; +layout(location = 1) out vec3 fragTexCoord; + +void main() { + gl_Position = + ubo.proj * + ubo.view * + ubo.model * + instPosRotScale * + vec4(inPosition, 1.0); + fragColor = vec4(0.0, 0.0, 0.0, 0.0); + fragTexCoord = vec3(inUV, 0); +} -- cgit v1.2.3