From b62ce3c3c83e2719e5fb02306dafe5f0bf5dd91c Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sat, 16 Oct 2021 15:31:48 +0100 Subject: render/vulkan: Use image view swizzles instead of shader hack Signed-off-by: Joshua Ashton --- render/vulkan/shaders/texture.frag | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'render/vulkan/shaders/texture.frag') diff --git a/render/vulkan/shaders/texture.frag b/render/vulkan/shaders/texture.frag index 7a7b8c57..0f9c52f1 100644 --- a/render/vulkan/shaders/texture.frag +++ b/render/vulkan/shaders/texture.frag @@ -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; } -- cgit v1.2.3