Debian Codegraph @

tests/manual/planets-qml/shaders/gl3/sun.frag

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 150 core
6
7 uniform sampler2D diffuseTexture;
8
9 in vec3 position;
10 in vec2 texCoord;
11
12 out vec4 fragColor;
13
14 vec4 dModel(const in vec2 flipYTexCoord)
15 {
16 // Lookup diffuse
17 vec3 diffuseColor = texture(diffuseTexture, flipYTexCoord).rgb;
18
19 return vec4(diffuseColor, 1.0);
20 }
21
22 void main()
23 {
24 vec2 flipYTexCoord = texCoord;
25 flipYTexCoord.y = 1.0 - texCoord.y;
26
27 vec4 result = dModel(flipYTexCoord);
28
29 fragColor = result;
30 }