Commit Graph

14 Commits (70d19d9c8097d355ad3a73f39c069980a2ab0628)

Author SHA1 Message Date
Casian Andrei 22569f7eb9 Remove forceAlpha uniform, which is no longer needed
This was originally added by d467fc1bdbcf69bd6ef213bd909633c2edfb6878,
to prevent alpha ending up to be 0 with blending disabled. Apparently,
that was a driver issue that is no longer present.

REVIEW: 107090
2012-11-13 22:23:18 +02:00
Casian Andrei a46d247702 Revert "Merge branch 'color2'"
This merge is incomplete and it does not include the review number of
the associated review request. It should have been pushed as a single
commit, because the merged commits were not intended to be published in
their form.

This reverts commit dcba90263069a221a5489b1915c5cf1ca39d090c, reversing
changes made to 50ae07525c7fde07794e7548c3d6e5a69cb1a89d.

Conflicts:
	kwin/scene_opengl.cpp
	kwin/scene_opengl.h
2012-11-13 22:19:32 +02:00
Casian Andrei f211961064 CC: Fix premultiplied alpha issue 2012-09-04 21:55:37 +03:00
Thomas Lübking d48042a258 use correct luminance calculation for greyscale 2011-12-18 19:51:53 +01:00
Pierre-Loup A. Griffais 309ce4013a kwin-gles: save a branch in the main shader
On less flexible hardware, one instruction for one branch might not be a good
trade.

REVIEW: 102886
2011-10-17 20:26:53 +02:00
Martin Gräßlin 2fc1ed25a5 Add a define KWIN_SHADER_DEBUG to all shaders
If the environment variable KWIN_GL_DEBUG is set to 1
the define KWIN_SHADER_DEBUG is added to the glsl
source code allowing to add some custom ifdefed
visual debug handling.

As an example it's added to scene-fragment.glsl to
paint everything in a greenish way.
2011-07-23 18:57:50 +02: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 73be6657ea kwin: Replace brightness and opacity with a modulation constant
This makes it possible to adjust both brightness and opacity
at the same time with one multiplication in the fragment shader.
2011-02-12 01:45:38 +01:00
Fredrik Höglund 28cf355b26 kwin: Fix a bug in the fragment shaders
The alpha channel must be set to 1 before the sample is modulated
with the brightness and opacity constants, not after.
2011-02-11 00:39:47 +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 d683ce560c Adding new uniform to enforce that alpha becomes 1.0
When rendering opaque (RGB-only) windows the alpha ends up to be 0
with blending disabled. This breaks subsequent rendering steps which
require blenden (e.g. Lanczos). Therefore a uniform is used to ensure
that the alpha channel is set to 1.
2011-01-30 14:12:04 +01:00
Martin Gräßlin 69044f10c5 GLShader appends the ES specific commands to the shaders 2011-01-30 14:12:01 +01:00
Martin Gräßlin 5804417acc And here comes the working OpenGL ES backend 2011-01-30 14:11:57 +01:00
Martin Gräßlin 56ce39def8 Core profile compatible basic scene rendering.
Adds a shader to render an untransformed scene. renderGLGeometry is not used any more and replaced by generated triangles stored in a GLVertexBuffer.
The GLVertexBuffer has a new attribute to decide whether a core profile compatible rendering has to be performed.
Currently windows and EffectFrames can make use of the new shader.
The shader contains a debug mode which colours all rendered fragments in green. It is currently enabled in scene_opengl.
Rendering transformed geometries (without shader) is currently broken.
2011-01-30 14:11:55 +01:00