master
ブランチ master
VulkanExample / VulkanExample / shader.vert
457 B、20行 生 Blame 履歴
1#version 450
2
3layout(binding = 0) uniform UniformBufferObject {
4 mat4 model;
5 mat4 view;
6 mat4 proj;
7} ubo;
8
9layout(location = 0) in vec2 pos;
10layout(location = 1) in vec3 col;
11layout(location = 2) in vec2 texCoord;
12
13layout(location = 0) out vec3 fragColor;
14layout(location = 1) out vec2 fragTexCoord;
15
16void main() {
17 gl_Position = ubo.proj * ubo.view * ubo.model * vec4(pos, 0.0, 1.0);
18 fragColor = col;
19 fragTexCoord = texCoord;
20}