aboutsummaryrefslogtreecommitdiff
path: root/render/vulkan/shaders
diff options
context:
space:
mode:
authorJoshua Ashton <joshua@froggi.es>2021-10-16 15:31:48 +0100
committerSimon Ser <contact@emersion.fr>2021-10-18 15:57:46 +0200
commitb62ce3c3c83e2719e5fb02306dafe5f0bf5dd91c (patch)
tree66d96cc73d1a2703b57a34e36acc40a8720d8c03 /render/vulkan/shaders
parente22a38631924d5a5678c11c86ec0b6c5a84fb0e5 (diff)
render/vulkan: Use image view swizzles instead of shader hack
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Diffstat (limited to 'render/vulkan/shaders')
-rw-r--r--render/vulkan/shaders/texture.frag11
1 files changed, 1 insertions, 10 deletions
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;
}