render/vulkan: Use image view swizzles instead of shader hack

Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
Joshua Ashton 2021-10-16 15:31:48 +01:00 committed by Simon Ser
parent e22a386319
commit b62ce3c3c8
3 changed files with 13 additions and 23 deletions

View file

@ -11,15 +11,6 @@ layout(push_constant) uniform UBO {
void main() {
out_color = textureLod(tex, uv, 0);
// We expect this shader to output pre-alpha-multiplied color values.
// alpha < 0.0 means that this shader should ignore the texture's alpha
// value.
if (data.alpha < 0.0) {
out_color.a = -data.alpha;
out_color.rgb *= -data.alpha;
} else {
out_color *= data.alpha;
}
out_color *= data.alpha;
}