2023-01-06 10:40:19 +08:00
|
|
|
#version 450
|
|
|
|
#extension GL_KHR_vulkan_glsl : enable
|
|
|
|
|
|
|
|
//#include "ShaderDescriptorDefinitions.glsl"
|
|
|
|
|
|
|
|
|
|
|
|
layout(location = 0) in vec3 aVertexPos;
|
2023-01-07 07:42:42 +08:00
|
|
|
layout(location = 4) in mat4 worldTransform;
|
2023-01-06 10:40:19 +08:00
|
|
|
|
|
|
|
layout(set = 1, binding = 0) uniform CameraData
|
|
|
|
{
|
|
|
|
vec4 position;
|
|
|
|
mat4 vpMat;
|
|
|
|
mat4 viewMat;
|
|
|
|
mat4 projMat;
|
|
|
|
} cameraData;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
|
|
|
// clip space for rendering
|
|
|
|
gl_Position = cameraData.vpMat * worldTransform * vec4 (aVertexPos, 1.0f);
|
|
|
|
}
|