fs_texture.sc 428 B

12345678910111213141516171819
  1. $input v_texcoord0, v_color0
  2. /*
  3. * Copyright 2011-2019 Branimir Karadzic. All rights reserved.
  4. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
  5. */
  6. #include "common.sh"
  7. SAMPLER2D(s_texColor, 0);
  8. void main()
  9. {
  10. vec4 color = texture2DLod(s_texColor, v_texcoord0.xy, u_textureLod);
  11. color.xyz = applyExposure(color.xyz);
  12. color *= v_color0;
  13. gl_FragColor = toOutput(color, u_outputFormat, u_sdrWhiteNits);
  14. }