2022-11-02 17:04:31 +08:00
|
|
|
#version 450
|
|
|
|
#extension GL_KHR_vulkan_glsl : enable
|
|
|
|
|
2022-12-15 01:45:44 +08:00
|
|
|
layout(location = 0) in vec3 aVertexPos;
|
2022-11-02 17:04:31 +08:00
|
|
|
layout(location = 1) in vec4 aVertColor;
|
|
|
|
|
2022-12-14 01:20:12 +08:00
|
|
|
// Output
|
2022-11-02 17:04:31 +08:00
|
|
|
layout(location = 0) out struct
|
|
|
|
{
|
|
|
|
vec4 vertColor; // location 0
|
|
|
|
} Out;
|
|
|
|
|
2022-12-28 20:47:20 +08:00
|
|
|
layout(set = 1, binding = 0) uniform CameraData
|
2022-11-02 17:04:31 +08:00
|
|
|
{
|
|
|
|
vec4 position;
|
|
|
|
mat4 vpMat;
|
2022-11-18 22:03:21 +08:00
|
|
|
mat4 viewMat;
|
2022-12-28 10:22:01 +08:00
|
|
|
mat4 projMat;
|
2022-11-02 17:04:31 +08:00
|
|
|
} cameraData;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2022-12-15 01:45:44 +08:00
|
|
|
gl_Position = cameraData.vpMat * vec4 (aVertexPos, 1.0f);
|
2022-11-02 17:04:31 +08:00
|
|
|
Out.vertColor = aVertColor;
|
|
|
|
}
|