Commit Graph

20 Commits (73153c861c242813f9439c17a37fb49ee60bf221)

Author SHA1 Message Date
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
2011-06-19 20:54:13 +02:00
Martin Gräßlin d396ce990b Fix untextured cube caps with GLSL 2011-05-01 11:28:07 +02:00
Martin Gräßlin 57c101c04d Fix sphere shader 2011-04-29 14:12:48 +02:00
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
2011-03-06 09:13:31 +01:00
Fredrik Höglund af92a4efd4 kwin: Rename sample to sampler in all shaders
A sample is not the same thing as a sampler.
2011-02-17 19:19:40 +01:00
Fredrik Höglund 5e97ccf7e0 kwin: Normalize the texcoords in the vertex shader 2011-02-10 20:15:23 +01:00
Martin Gräßlin d9fb2bd789 Cylinder and Sphere ported to new rendering stack 2011-01-30 14:12:06 +01:00
Martin Gräßlin ef7fd87d65 Mirror bottom cube cap in shader. 2011-01-30 14:12:02 +01:00
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.
2011-01-30 14:12:02 +01:00
Martin Gräßlin e5b6baeda9 Reflection plane in cube effect and GLSL 2011-01-30 14:12:02 +01:00
Martin Gräßlin 82e1c0741e Correctly change brightness and opacity in cylinder/sphere shader
svn path=/trunk/KDE/kdebase/workspace/; revision=971720
2009-05-23 09:28:19 +00:00
Martin Gräßlin 61e619c83b Revert 971713 - it can be done easier.
svn path=/trunk/KDE/kdebase/workspace/; revision=971719
2009-05-23 09:28:17 +00:00
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
2009-05-23 08:55:54 +00:00
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
2009-04-27 11:35:35 +00:00
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
2009-04-20 11:07:47 +00:00
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
2009-02-22 10:58:26 +00:00
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
2009-02-19 20:32:20 +00:00
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
2009-02-19 11:50:00 +00:00
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
2009-02-14 09:29:01 +00:00
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
2009-02-05 15:35:38 +00:00