lens_flares.glslf 875 B

1234567891011121314151617181920212223242526
  1. #version GLSL_VERSION
  2. #include <precision_statement.glslf>
  3. #include <std.glsl>
  4. #include <color_util.glslf>
  5. uniform sampler2D u_sampler;
  6. /*==============================================================================
  7. SHADER INTERFACE
  8. ==============================================================================*/
  9. GLSL_IN vec2 v_texcoord;
  10. //------------------------------------------------------------------------------
  11. GLSL_OUT vec4 GLSL_OUT_FRAG_COLOR;
  12. /*==============================================================================
  13. MAIN
  14. ==============================================================================*/
  15. void main(void) {
  16. vec4 color = GLSL_TEXTURE(u_sampler, v_texcoord);
  17. lin_to_srgb(color.rgb);
  18. premultiply_alpha(color.rgb, color.a);
  19. GLSL_OUT_FRAG_COLOR = color;
  20. }