fs_texture_3d.sc 449 B

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