/usr/share/kde4/apps/kwin/shaders/1.40/cylinder.vert is in kde-window-manager-common 4:4.11.8-0ubuntu6.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | /********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2008, 2011 Martin Gräßlin <kde@martin-graesslin.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#version 140
uniform mat4 projection;
uniform mat4 modelview;
uniform mat4 screenTransformation;
uniform mat4 windowTransformation;
uniform float width;
uniform float cubeAngle;
uniform float xCoord;
uniform float timeLine;
in vec4 vertex;
in vec2 texCoord;
out vec2 varyingTexCoords;
void main()
{
varyingTexCoords = texCoord;
vec4 transformedVertex = vec4(vertex.x - ( width - xCoord ), vertex.yzw);
float radian = radians(cubeAngle);
float radius = (width)*tan(radian);
float azimuthAngle = radians(transformedVertex.x/(width)*(90.0 - cubeAngle));
transformedVertex.x = width - xCoord + radius * sin( azimuthAngle );
transformedVertex.z = vertex.z + radius * cos( azimuthAngle ) - radius;
vec3 diff = (vertex.xyz - transformedVertex.xyz)*timeLine;
transformedVertex.xyz += diff;
gl_Position = projection*(modelview*screenTransformation*windowTransformation)*transformedVertex;
}
|