2023-06-08 09:00:18 +00:00
|
|
|
#version 450
|
2017-01-01 22:47:53 +00:00
|
|
|
|
2023-05-20 00:56:02 +00:00
|
|
|
#include "common.frag.glsl"
|
2017-01-17 04:36:03 +00:00
|
|
|
#include "clip.frag.glsl"
|
2023-05-15 00:25:41 +00:00
|
|
|
#include "rect.frag.glsl"
|
2017-01-01 22:47:53 +00:00
|
|
|
|
|
|
|
layout(location = 0) in vec2 inPos;
|
2023-05-15 00:25:41 +00:00
|
|
|
layout(location = 1) in Rect inRect;
|
|
|
|
layout(location = 2) in vec2 inTexCoord;
|
2023-05-23 03:08:13 +00:00
|
|
|
layout(location = 3) flat in uvec2 inTexId;
|
2017-01-01 22:47:53 +00:00
|
|
|
|
|
|
|
layout(location = 0) out vec4 color;
|
|
|
|
|
|
|
|
void main()
|
|
|
|
{
|
2023-05-15 00:25:41 +00:00
|
|
|
float alpha = rect_coverage (inRect, inPos);
|
2023-05-23 03:08:13 +00:00
|
|
|
color = clip_scaled (inPos, texture (get_sampler (inTexId), inTexCoord) * alpha);
|
2017-01-01 22:47:53 +00:00
|
|
|
}
|