Debian Codegraph @

tests/manual/planets-qml/shaders/rhi/sun.vert

raw
1 // Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
2 // Copyright (C) 2017 The Qt Company Ltd.
3 // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
4
5 #version 450 core
6
7
8 layout(location=0) in vec3 vertexPosition;
9 layout(location=1) in vec2 vertexTexCoord;
10
11 layout(location=0) out vec3 position;
12 layout(location=1) out vec2 texCoord;
13
14 layout(std140, binding = 1) uniform qt3d_command_uniforms {
15 mat4 modelMatrix;
16 mat4 inverseModelMatrix;
17 mat4 modelViewMatrix;
18 mat3 modelNormalMatrix;
19 mat4 inverseModelViewMatrix;
20 mat4 modelViewProjection;
21 mat4 inverseModelViewProjectionMatrix;
22 };
23
24 layout(std140, binding = 2) uniform extras_uniforms {
25 float texCoordScale;
26 vec3 ka; // Ambient reflectivity
27 vec3 ks; // Specular reflectivity
28 float shininess; // Specular shininess factor
29 float opacity; // Alpha channel
30 vec3 lightPosition;
31 vec3 lightIntensity;
32 };
33
34 void main()
35 {
36 texCoord = vertexTexCoord * texCoordScale;
37 position = vec3(modelViewMatrix * vec4(vertexPosition, 1.0));
38 gl_Position = modelViewProjection * vec4(vertexPosition, 1.0);
39 }