summaryrefslogtreecommitdiff
path: root/gsk/vulkan/resources/color.frag
blob: 1d1d576fec44729fb4f6f85ea2940e7f43f4be2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#version 450
#extension GL_EXT_debug_printf : enable

#include "clip.frag.glsl"
#include "rect.frag.glsl"

layout(location = 0) in vec2 inPos;
layout(location = 1) in Rect inRect;
layout(location = 2) in vec4 inColor;

layout(location = 0) out vec4 color;

void main()
{
  float alpha = inColor.a * rect_coverage (inRect, inPos);
  color = clip_scaled (inPos, vec4(inColor.rgb, 1) * alpha);
}