#version 460 // Set 0 is the default, so we could omit it, but we prefer to be explicit. // It specifies which the descriptor set layout the binding index pertains to; // see init_pipeline() in render.rs. layout(set = 0, binding = 1) uniform sampler textureSampler; layout(set = 1, binding = 0) uniform texture2D textureImage; layout(location = 0) in vec3 fragmentColor; layout(location = 1) in vec2 fragmentTextureCoordinate; layout(location = 0) out vec4 outColor; void main() { outColor = vec4(fragmentColor * texture(sampler2D(textureImage, textureSampler), fragmentTextureCoordinate).rgb, 1.0); }