extractHighlights.fragment.js 712 B

1234567891011121314
  1. // Do not edit.
  2. import { ShaderStore } from "../Engines/shaderStore.js";
  3. import "./ShadersInclude/helperFunctions.js";
  4. const name = "extractHighlightsPixelShader";
  5. const shader = `#include<helperFunctions>
  6. varying vec2 vUV;uniform sampler2D textureSampler;uniform float threshold;uniform float exposure;
  7. #define CUSTOM_FRAGMENT_DEFINITIONS
  8. void main(void)
  9. {gl_FragColor=texture2D(textureSampler,vUV);float luma=dot(LuminanceEncodeApprox,gl_FragColor.rgb*exposure);gl_FragColor.rgb=step(threshold,luma)*gl_FragColor.rgb;}`;
  10. // Sideeffect
  11. ShaderStore.ShadersStore[name] = shader;
  12. /** @internal */
  13. export const extractHighlightsPixelShader = { name, shader };
  14. //# sourceMappingURL=extractHighlights.fragment.js.map