1 varying mediump vec2 vTexCoord;
2 uniform sampler2D sTexture;
3 uniform lowp vec4 uColor;
4 uniform mediump float uBloomThreshold;
5 uniform mediump float uRecipOneMinusBloomThreshold;
10 col = texture2D(sTexture, vTexCoord);
11 col = (col - uBloomThreshold) * uRecipOneMinusBloomThreshold; // remove intensities lower than the thresold and remap intensities above the threshold to [0..1]
12 gl_FragColor = clamp(col, 0.0, 1.0);