22 Commits (a6f32bf3e835b7abfc8c49cf5a9ab90535c37845)

Author SHA1 Message Date
Martin Gräßlin c1486596fb GLSL 1.40 shaders for cube effect
Shaders are moved into dedicated directories 1.10 and 1.40. 1.10 contains
the already existing versions, 1.40 copies of them adjusted to GLSL 1.40.

REVIEW: 110571
11 years ago
Martin Gräßlin 2bee9a0ee0 Use generic fragment shader for Cylinder and Sphere
Shaders were broken. Issue mentioned in the TODO seems to no longer be
present (at least not on the system I used for testing).

REVIEW: 110570
11 years ago
Martin Gräßlin a05ad98896 Remove textureWidth/textureHeight from all Shaders
The uniforms textureWidth and textureHeight were only needed for
normal windows. For everything else it was just 1.0/1.0, that is
normalized.

The makeArrays method is changed to produce normalized texcoords
obsoleting the need for these uniforms. So two uniforms less, one
calculation in vertex shaders less and many many lines of code
removed.

At the same time makeArrays is also adjusted to take care of
yInverted of the texture, which is needed as we no longer can use
the enableUnnormalizedTexCoords which did the yInverted transformation.

REVIEW: 101646
13 years ago
Martin Gräßlin d396ce990b Fix untextured cube caps with GLSL 14 years ago
Martin Gräßlin 57c101c04d Fix sphere shader 14 years ago
Martin Gräßlin a728823fbe Fix passing matrixes to the shaders
QMatrix4x4 accepts data in row-major order, but returns them in
column-major order, which is not documented and because of that
I expected them to be in row-major order.
This commit fixes it and rewrites the shaders to apply the matrix
multiplications in the right order.
REVIEW: 100759
14 years ago
Fredrik Höglund af92a4efd4 kwin: Rename sample to sampler in all shaders
A sample is not the same thing as a sampler.
14 years ago
Fredrik Höglund 5e97ccf7e0 kwin: Normalize the texcoords in the vertex shader 14 years ago
Martin Gräßlin d9fb2bd789 Cylinder and Sphere ported to new rendering stack 14 years ago
Martin Gräßlin ef7fd87d65 Mirror bottom cube cap in shader. 14 years ago
Martin Gräßlin 75a1ee7aa8 CubeCaps back in GLES mode.
This includes quite some refactoring. For the cube cap a VBO is used
instead of glLists and all the required transformations are moved into
paintCap() which makes paintScreen more clean.
Currently the mirroring of bottom texture is still missing and cylinder
and sphere caps are not yet ported to using VBO.
I wouldn't be surprised if it is broken for legacy GL atm.
14 years ago
Martin Gräßlin e5b6baeda9 Reflection plane in cube effect and GLSL 14 years ago
Martin Gräßlin 82e1c0741e Correctly change brightness and opacity in cylinder/sphere shader
svn path=/trunk/KDE/kdebase/workspace/; revision=971720
16 years ago
Martin Gräßlin 61e619c83b Revert 971713 - it can be done easier.
svn path=/trunk/KDE/kdebase/workspace/; revision=971719
16 years ago
Martin Gräßlin 339895beac Change saturation, brightness and opacity in cylinder and sphere shader in exactly the same way as the texture modulation in scene_opengl.
svn path=/trunk/KDE/kdebase/workspace/; revision=971713
16 years ago
Martin Gräßlin 144f578a5d Cylinder and Sphere use new setting of texture width and height. For that renaming windowWidth and windowHeight to textureWidth/Height. So finally the new argb decos work with cylinder and sphere.
svn path=/trunk/KDE/kdebase/workspace/; revision=959842
16 years ago
Martin Gräßlin 3e56e98281 Use opacity, brighness and saturation in shader for cylinder and sphere. That allows to have dimmed windows in these effects and correct window opacity.
svn path=/trunk/KDE/kdebase/workspace/; revision=956595
16 years ago
Martin Gräßlin eae6279ca9 Fill empty areas in multi screen setups in cylinder and sphere as well.
svn path=/trunk/KDE/kdebase/workspace/; revision=929833
16 years ago
Martin Gräßlin c648f03313 A new vertex shader for cylinder effect using polar coordinates. Solves some painting problems.
Adding a new cylinder cap as well as the new cylinder is smaller than the old one.

svn path=/trunk/KDE/kdebase/workspace/; revision=928679
16 years ago
Martin Gräßlin bdef1d7c5b Smoothly transform to cube and sphere during start animation and vice versa during stop animation.
Caps have to be deformed during start/stop as well.

svn path=/trunk/KDE/kdebase/workspace/; revision=928308
16 years ago
Martin Gräßlin 4fa09b63b4 Sphere and Cylinder become part of Cube effect. That is much more convenient than having an own effect for each (only loading the shader is actually required).
Btw caps of cylinder and sphere are working correctly again.

svn path=/trunk/KDE/kdebase/workspace/; revision=925809
16 years ago
Lucas Murray 846496d2c1 Cleaned up the effects/ directory by moving each individual effect into
its own directory, cleaned up the effect config macros and renamed
"MakeTransparent" to "Translucency" so that it matches its visible name.

svn path=/trunk/KDE/kdebase/workspace/; revision=921749
16 years ago