diff options
author | Chris "Koying" Browet <cbro@semperpax.com> | 2015-01-17 20:06:05 +0100 |
---|---|---|
committer | Chris "koying" Browet <cbro@semperpax.com> | 2015-01-20 14:17:09 +0100 |
commit | 4b709f5a5abcc7ffc37a83659351e758ee699726 (patch) | |
tree | 7ed9ac913b4459f7a2c1aade231c909c861feff2 /system/shaders/guishader_frag_rgba.glsl | |
parent | d16066960f7fc50f6043460fd7906cd60461ec74 (diff) |
ADD: [gles] enable contrast & brightness controls
Diffstat (limited to 'system/shaders/guishader_frag_rgba.glsl')
-rw-r--r-- | system/shaders/guishader_frag_rgba.glsl | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/system/shaders/guishader_frag_rgba.glsl b/system/shaders/guishader_frag_rgba.glsl index e65419d68f..bbda050a9c 100644 --- a/system/shaders/guishader_frag_rgba.glsl +++ b/system/shaders/guishader_frag_rgba.glsl @@ -26,8 +26,14 @@ varying vec4 m_cord1; varying lowp vec4 m_colour; uniform int m_method; -// SM_TEXTURE_NOBLEND +uniform float m_brightness; +uniform float m_contrast; + void main () { - gl_FragColor.rgba = texture2D(m_samp0, m_cord0.xy).rgba; + vec4 color = texture2D(m_samp0, m_cord0.xy).rgba; + color = color * m_contrast; + color = color + m_brightness; + + gl_FragColor.rgba = color; } |