mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render/vulkan: Use image view swizzles instead of shader hack
Signed-off-by: Joshua Ashton <joshua@froggi.es>
This commit is contained in:
parent
e22a386319
commit
b62ce3c3c8
3 changed files with 13 additions and 23 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue