aboutsummaryrefslogtreecommitdiff
path: root/system/shaders/guishader_frag_rgba_bob.glsl
diff options
context:
space:
mode:
authorChris "Koying" Browet <cbro@semperpax.com>2015-01-17 20:06:05 +0100
committerChris "koying" Browet <cbro@semperpax.com>2015-01-20 14:17:09 +0100
commit4b709f5a5abcc7ffc37a83659351e758ee699726 (patch)
tree7ed9ac913b4459f7a2c1aade231c909c861feff2 /system/shaders/guishader_frag_rgba_bob.glsl
parentd16066960f7fc50f6043460fd7906cd60461ec74 (diff)
ADD: [gles] enable contrast & brightness controls
Diffstat (limited to 'system/shaders/guishader_frag_rgba_bob.glsl')
-rw-r--r--system/shaders/guishader_frag_rgba_bob.glsl9
1 files changed, 8 insertions, 1 deletions
diff --git a/system/shaders/guishader_frag_rgba_bob.glsl b/system/shaders/guishader_frag_rgba_bob.glsl
index 3b02726496..d2d75f977b 100644
--- a/system/shaders/guishader_frag_rgba_bob.glsl
+++ b/system/shaders/guishader_frag_rgba_bob.glsl
@@ -28,6 +28,9 @@ uniform int m_method;
uniform int m_field;
uniform float m_step;
+uniform float m_brightness;
+uniform float m_contrast;
+
void main ()
{
vec2 source;
@@ -43,5 +46,9 @@ void main ()
below.x = source.x;
below.y = source.y + (2.0*m_step*bstep);
- gl_FragColor = mix(texture2D(m_samp0, source), texture2D(m_samp0, below), 0.5);
+ vec4 color = mix(texture2D(m_samp0, source), texture2D(m_samp0, below), 0.5);
+ color = color * m_contrast;
+ color = color + m_brightness;
+
+ gl_FragColor.rgba = color;
}