Subversion Repository Public Repository

Divide-Framework

This repository has no backups
This repository's network speed is throttled to 100KB/sec

Diff Revisions 166 vs 169 for /trunk/assets/shaders/GLSL/bright.glsl

Diff revisions: vs.
  @@ -3,7 +3,6 @@
3 3
4 4 void main(void)
5 5 {
6 -
7 6 computeData();
8 7 }
9 8
  @@ -11,18 +10,12 @@
11 10
12 11 in vec2 _texCoord;
13 12 out vec4 _colorOut;
14 - uniform sampler2D texScreen;
15 13
16 - #define THRESHOLD 0.95
14 + uniform sampler2D texScreen;
15 + uniform float whitePoint = 0.95;
17 16
18 17 void main(){
19 - vec4 value = texture(texScreen, _texCoord);
20 - if(value.a == 0) discard;
21 - float selection = clamp(sign(((value.r + value.g + value.b)/3.0) - THRESHOLD),0.0,1.0);
22 -
23 - _colorOut = mix(vec4(0.0, 0.0, 0.0, 0.0),
24 - vec4(1.0, 1.0, 1.0, 1.0),
25 - selection);
26 -
18 + vec3 value = texture(texScreen, _texCoord).rgb;
27 19
20 + _colorOut = clamp(sign(((value.r + value.g + value.b)/3.0) - whitePoint) * vec4(1.0), 0.0, 1.0);
28 21 }