SHADE_Y3/Assets/Shaders/DebugDraw_VS.glsl

26 lines
478 B
Plaintext
Raw Normal View History

#version 450
#extension GL_KHR_vulkan_glsl : enable
layout(location = 0) in vec3 aVertexPos;
layout(location = 1) in vec4 aVertColor;
// Output
layout(location = 0) out struct
{
vec4 vertColor; // location 0
} Out;
layout(set = 2, binding = 0) uniform CameraData
{
vec4 position;
mat4 vpMat;
2022-11-18 22:03:21 +08:00
mat4 viewMat;
mat4 perspectiveMat;
mat4 orthoMat;
} cameraData;
void main()
{
gl_Position = cameraData.vpMat * vec4 (aVertexPos, 1.0f);
Out.vertColor = aVertColor;
}