1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
12 in vec3 vertexPositionModelspace;
13 in vec3 vertexNormalModelspace;
18 out vec3 positionWorldspace;
19 out vec3 normalCameraspace;
20 out vec4 fragBarColor;
24 uniform mat4 transMatrix;
25 uniform float minCoordX;
26 uniform float maxCoordX;
30 positionWorldspace = (transMatrix * M * vec4(vertexPositionModelspace,1)).xyz;
32 positionWorldspace.x = clamp(positionWorldspace.x, minCoordX, maxCoordX);
34 gl_Position = P * V * vec4(positionWorldspace,1);
36 normalCameraspace = normalize(mat3(V) * normalMatrix * vertexNormalModelspace);
38 fragBarColor = barColor;
41 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */