I have 2 codes, one for brightness and one for contrast as follows.
brightness
"precision mediump float;" + " varying vec2 v