blob: 3ae1c9fb0eff985b08ba3cd639523fc03a84c453 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#version 450
layout(location = 0) in vec3 vertexPosition;
layout(location = 1) in vec3 vertexNormal;
layout(location = 2) in vec4 vertexColor;
layout(location = 0) out vec3 worldPosition;
layout(location = 1) out vec3 worldNormal;
layout(location = 2) out vec4 color;
layout(std140, binding = 1) uniform qt3d_command_uniforms {
mat4 modelMatrix;
mat4 inverseModelMatrix;
mat4 modelViewMatrix;
mat3 modelNormalMatrix;
mat4 inverseModelViewMatrix;
mat4 mvp;
mat4 inverseModelViewProjectionMatrix;
};
void main()
{
worldNormal = normalize( modelNormalMatrix * vertexNormal );
worldPosition = vec3( modelMatrix * vec4( vertexPosition, 1.0 ) );
color = vertexColor;
gl_Position = mvp * vec4( vertexPosition, 1.0 );
}
|