Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-26 16:42:08 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-04-26 17:37:59 +0300
commitc490428bd4dff75fb371777d4e95ea270c77ea94 (patch)
tree9cc348fc846dd551ecf716a5335278ceea5ea60d /source/blender/gpu/shaders
parent5876856f7bdaac74ae5b09afb5a2c81cdb4f873e (diff)
UI: desaturate toolbar icons that the mouse is not over.
This does not look great with light toolbar buttons as in the default, so consider this a work in progress.
Diffstat (limited to 'source/blender/gpu/shaders')
-rw-r--r--source/blender/gpu/shaders/gpu_shader_image_desaturate_frag.glsl13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/shaders/gpu_shader_image_desaturate_frag.glsl b/source/blender/gpu/shaders/gpu_shader_image_desaturate_frag.glsl
new file mode 100644
index 00000000000..5b2ccb8ff3a
--- /dev/null
+++ b/source/blender/gpu/shaders/gpu_shader_image_desaturate_frag.glsl
@@ -0,0 +1,13 @@
+
+in vec2 texCoord_interp;
+out vec4 fragColor;
+
+uniform vec4 color;
+uniform sampler2D image;
+
+void main()
+{
+ vec4 tex = texture(image, texCoord_interp);
+ tex.rgb = 0.3333333 * vec3(tex.r + tex.g + tex.b);
+ fragColor = tex * color;
+}