blob: e08850e9ab6f459535938758bd23e1673878c9c0 (
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
|
// Copyright (C) 2014 Klaralvdalens Datakonsult AB (KDAB).
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
uniform sampler2D diffuseTexture;
varying highp vec3 position;
varying highp vec2 texCoord;
highp vec4 dModel(const highp vec2 flipYTexCoord)
{
// Lookup diffuse
highp vec3 diffuseColor = texture2D(diffuseTexture, flipYTexCoord).rgb;
return vec4(diffuseColor, 1.0);
}
void main()
{
highp vec2 flipYTexCoord = texCoord;
flipYTexCoord.y = 1.0 - texCoord.y;
highp vec4 result = dModel(flipYTexCoord);
gl_FragColor = result;
}
|