summaryrefslogtreecommitdiff
path: root/gsk/resources/vulkan/opacity-clip.frag.glsl
blob: 7ff7d347c70487bdd9e8d89091656fcd4447c0ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#version 420 core

layout(location = 0) in vec2 inTexCoord;
layout(location = 1) in flat float inOpacity;

layout(set = 0, binding = 0) uniform sampler2D inTexture;

layout(location = 0) out vec4 color;

vec4
opacity (vec4 color, float value)
{
  return color * value;
}

void main()
{
  color = opacity (texture (inTexture, inTexCoord), inOpacity);
}