2
0

shader_frag_texture.frag 394 B

123456789101112131415
  1. #version 330
  2. #extension GL_ARB_separate_shader_objects : enable
  3. #extension GL_ARB_shading_language_420pack : enable
  4. layout(set=1, binding=2) uniform sampler2D _tex;
  5. layout (location = 0) in vec2 fragTexCoord;
  6. layout (location = 1) in vec4 fragColor;
  7. layout (location = 0) out vec4 finalColor;
  8. void main() {
  9. vec4 texColor = texture(_tex, fragTexCoord);
  10. finalColor = fragColor * texColor;
  11. }