blob: f9697c8e51f8c96a8ca851cb68ee73b71c6294b9 (
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 GPL-3.0-only
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;
}
|