Commit graph

14 commits

Author SHA1 Message Date
Martin Gräßlin
0827c2903b Use GLPlatform to decide whether shaders are supported
Dropping the static methods from GLShader and use supports()
where it was used before.
2011-02-19 11:08:43 +01:00
Martin Gräßlin
0a7e48f7aa KWin uses kdelibs coding style. 2011-01-31 20:07:03 +01:00
Martin Gräßlin
8c4fc28e1a Blur ported to GLES.
It now uses a GLShader for GLSL shaders and pushes it using the
ShaderManager.

It does not work with the nouveau driver plus GLES, but it works
with fglrx + desktop GL 2.x, so I assume it is a driver problem here.
2011-01-30 14:12:06 +01:00
Martin Gräßlin
6270b502ba ARB Shader fallback to Lanczos filter.
This allows using Lanczos filter also on systems not supporting GLSL.
See http://svn.reviewboard.kde.org/r/5777/

svn path=/trunk/KDE/kdebase/workspace/; revision=1195273
2010-11-10 18:25:40 +00:00
Fredrik Höglund
08f51821b7 Don't set gl_TextCoord[0] in the vertex shader when the fragment
shader doesn't use it.

svn path=/trunk/KDE/kdebase/workspace/; revision=1178357
2010-09-22 20:13:01 +00:00
Fredrik Höglund
62b9c59da6 Rewrite the fragment program to avoid exceeding the texture indirection
limit on some GPU's.

Thanks to Mikael Gerdin, Christoph Feck and Iori Yagami for testing.

svn path=/trunk/KDE/kdebase/workspace/; revision=1138004
2010-06-14 22:13:48 +00:00
Fredrik Höglund
253647ec1e Sanity check the shader limitations to protect against implementations
returning bogus values.

FIXED-IN: 4.5
BUG: 241449

svn path=/trunk/KDE/kdebase/workspace/; revision=1137677
2010-06-14 00:18:04 +00:00
Fredrik Höglund
b13174e785 Tweak the code in the fragment shader to get the Mesa GLSL compiler to emit
MAD's instead of MUL + ADD.

svn path=/trunk/KDE/kdebase/workspace/; revision=1136438
2010-06-09 20:59:24 +00:00
Fredrik Höglund
69ab6ec3b7 Use GL_CONSTANT_ALPHA instead of reducing the opacity in the fragment shader.
This makes the blending work correctly when the alpha bits are zero,
which is apparently the case with NVidia.

svn path=/trunk/KDE/kdebase/workspace/; revision=1102471
2010-03-12 16:10:57 +00:00
Fredrik Höglund
c82351488e Make sure that both the render target and the shader are valid
before using them.

svn path=/trunk/KDE/kdebase/workspace/; revision=1102465
2010-03-12 15:56:19 +00:00
Fredrik Höglund
728e3ed6f6 Use the texture matrix to do the screen to texture coordinate transformations.
svn path=/trunk/KDE/kdebase/workspace/; revision=1101728
2010-03-10 18:31:59 +00:00
Fredrik Höglund
67e0e91168 Check some HW limits and make sure we don't exceed them.
svn path=/trunk/KDE/kdebase/workspace/; revision=1101724
2010-03-10 18:16:18 +00:00
Fredrik Höglund
3de8c53f21 Refactor the blur shader code a bit, and add a GLSL version.
svn path=/trunk/KDE/kdebase/workspace/; revision=1100848
2010-03-08 20:45:58 +00:00
Fredrik Höglund
53391ba944 Initial commit of the blur effect rewrite.
svn path=/trunk/KDE/kdebase/workspace/; revision=1099619
2010-03-05 20:42:10 +00:00