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 varying float fade_factor; // 0->1 fade factor used for AA
13 varying float multiply;
15 #ifdef USE_VERTEX_COLORS
16 varying vec4 vertex_color;
28 #ifdef USE_VERTEX_COLORS
29 vec4 result = vertex_color;
34 if (type == TYPE_LINE)
36 float dist = (1.0 - abs(fade_factor)) * multiply;
37 float alpha = clamp(dist, 0.0, 1.0);
38 result.a = result.a * alpha;
41 gl_FragColor = result;
44 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */