gtk/gsk/vulkan/resources/glyph.vert
Benjamin Otte 2d6ebbb4d5 vulkan: Add a glyph shader
This shader is an updated version of the mask shader, but I want to use
the mask name for the mask node and that's a different functionality.

Also, add an operation for it and partially implement the mask node
using it, so we can test that this shader works.

Replacing the shader used for text rendering is the next step.
2023-07-16 12:12:59 +02:00

27 lines
660 B
GLSL

#version 450
#include "common.vert.glsl"
#include "rect.vert.glsl"
layout(location = 0) in vec4 inRect;
layout(location = 1) in vec4 inTexRect;
layout(location = 2) in vec4 inColor;
layout(location = 3) in uint inTexId;
layout(location = 0) out vec2 outPos;
layout(location = 1) out flat Rect outRect;
layout(location = 2) out vec2 outTexCoord;
layout(location = 3) out flat uint outTexId;
layout(location = 4) out flat vec4 outColor;
void main() {
Rect r = rect_from_gsk (inRect);
vec2 pos = set_position_from_rect (r);
outPos = pos;
outRect = r;
outTexCoord = scale_tex_coord (pos, r, inTexRect);
outTexId = inTexId;
outColor = inColor;
}