|
@@ -0,0 +1,28 @@
|
|
1
|
+#version 450
|
|
2
|
+
|
|
3
|
+#extension GL_ARB_separate_shader_objects : enable
|
|
4
|
+#extension GL_ARB_shading_language_420pack : enable
|
|
5
|
+
|
|
6
|
+layout (location = 0) in vec3 inPos;
|
|
7
|
+layout (location = 1) in vec3 inColor;
|
|
8
|
+
|
|
9
|
+layout (binding = 0) uniform UBO
|
|
10
|
+{
|
|
11
|
+ mat4 projectionMatrix;
|
|
12
|
+ mat4 modelMatrix;
|
|
13
|
+ mat4 viewMatrix;
|
|
14
|
+} ubo;
|
|
15
|
+
|
|
16
|
+layout (location = 0) out vec3 outColor;
|
|
17
|
+
|
|
18
|
+out gl_PerVertex
|
|
19
|
+{
|
|
20
|
+ vec4 gl_Position;
|
|
21
|
+};
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+void main()
|
|
25
|
+{
|
|
26
|
+ outColor = inColor;
|
|
27
|
+ gl_Position = ubo.projectionMatrix * ubo.viewMatrix * ubo.modelMatrix * vec4(inPos.xyz, 1.0);
|
|
28
|
+}
|