defaultShader.frag 451 B

123456789101112131415161718192021
  1. #version 430 core
  2. #extension GL_ARB_bindless_texture: require
  3. layout (location = 0) out vec4 out_color;
  4. layout(binding = 0) uniform sampler2D u_texture;
  5. in vec2 v_uv;
  6. in float v_color;
  7. in flat uvec2 v_textureSampler;
  8. void main()
  9. {
  10. //vec4 textureColor = texture(u_texture, v_uv);
  11. vec4 textureColor = texture(sampler2D(v_textureSampler), v_uv);
  12. if(textureColor.a < 0.1){discard;}
  13. out_color = vec4(textureColor.rgb*v_color,textureColor.a);
  14. }