kas-wgpu 0.14.0-alpha

KAS GUI / wgpu front-end
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License in the LICENSE-APACHE file or at:
//     https://www.apache.org/licenses/LICENSE-2.0

#version 450
#extension GL_ARB_separate_shader_objects : enable

precision mediump float;

layout(location = 0) in vec2 tex_coord;
layout(location = 1) in vec4 col;

layout(location = 0) out vec4 outColor;

layout(set = 1, binding = 0) uniform texture2D tex;
layout(set = 1, binding = 1) uniform sampler tex_sampler;

void main() {
    float alpha = texture(sampler2D(tex, tex_sampler), tex_coord).r;
    outColor = vec4(col.rgb, col.a * alpha);
}