extractHighlights.fragment.fx 341 B

1234567891011121314
  1. #include<helperFunctions>
  2. // Samplers
  3. varying vec2 vUV;
  4. uniform sampler2D textureSampler;
  5. uniform float threshold;
  6. uniform float exposure;
  7. void main(void)
  8. {
  9. gl_FragColor = texture2D(textureSampler, vUV);
  10. float luma = getLuminance(gl_FragColor.rgb * exposure);
  11. gl_FragColor.rgb = step(threshold, luma) * gl_FragColor.rgb;
  12. }