Warning, /frameworks/kquickcharts/src/shaders/linechart.vert is written in an unsupported language. File is not indexed.
0001 /* 0002 * This file is part of KQuickCharts 0003 * SPDX-FileCopyrightText: 2019 Arjen Hiemstra <ahiemstra@heimr.nl> 0004 * SPDX-FileCopyrightText: 2022 Łukasz Wojniłowicz <lukasz.wojnilowicz@gmail.com> 0005 * 0006 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL 0007 */ 0008 0009 #line 8 0010 0011 uniform highp mat4 matrix; 0012 uniform lowp float lineWidth; 0013 uniform lowp float aspect; 0014 0015 #define MAXIMUM_POINT_COUNT 18 0016 0017 #ifdef LEGACY_STAGE_INOUT 0018 #define in attribute 0019 #define out varying 0020 #endif 0021 0022 in highp vec4 in_vertex; 0023 in mediump vec2 in_uv; 0024 0025 in mediump vec4 in_lineColor; 0026 in mediump vec4 in_fillColor; 0027 in mediump vec2 in_bounds; 0028 0029 in highp float in_count; 0030 0031 // Input points. Since OpenGL 2.1/GLSL 1.10 does not support array vertex 0032 // attributes, we have to manually declare a number of attributes. We use 0033 // array of vec4 point tuples instead of vec2 to not cross the OpenGL limits 0034 // like e.g. GL_MAX_VERTEX_ATTRIBS for some drivers. 0035 in mediump vec4 in_points_0; 0036 in mediump vec4 in_points_1; 0037 in mediump vec4 in_points_2; 0038 in mediump vec4 in_points_3; 0039 in mediump vec4 in_points_4; 0040 in mediump vec4 in_points_5; 0041 in mediump vec4 in_points_6; 0042 in mediump vec4 in_points_7; 0043 in mediump vec4 in_points_8; 0044 0045 out mediump vec2 uv; 0046 out mediump vec4 pointTuples[MAXIMUM_POINT_COUNT / 2]; 0047 out highp float pointCount; 0048 out mediump vec2 bounds; 0049 out mediump vec4 lineColor; 0050 out mediump vec4 fillColor; 0051 0052 void main() { 0053 uv = in_uv; 0054 uv.y = (1.0 + -1.0 * uv.y) * aspect; 0055 0056 pointTuples[0] = in_points_0; 0057 pointTuples[1] = in_points_1; 0058 pointTuples[2] = in_points_2; 0059 pointTuples[3] = in_points_3; 0060 pointTuples[4] = in_points_4; 0061 pointTuples[5] = in_points_5; 0062 pointTuples[6] = in_points_6; 0063 pointTuples[7] = in_points_7; 0064 pointTuples[8] = in_points_8; 0065 0066 pointCount = in_count; 0067 bounds = in_bounds; 0068 0069 lineColor = in_lineColor; 0070 fillColor = in_fillColor; 0071 0072 gl_Position = matrix * in_vertex; 0073 }