Debian Codegraph @

src/extras/shaders/rhi/gooch.vert

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