ScreenLockDetector/shaders/text.frag

24 lines
535 B
GLSL
Raw Normal View History

#version 450
layout(location = 0) in vec4 fragColor;
layout(location = 1) in vec2 fragTexCoord;
layout(location = 0) out vec4 outColor;
layout(binding = 0) uniform UniformBufferObject {
float time;
vec2 resolution;
float rotation;
float wavePhase;
} ubo;
layout(binding = 1) uniform sampler2D texSampler;
void main() {
// Sample the font texture atlas
float alpha = texture(texSampler, fragTexCoord).r;
// Apply color with alpha from texture
outColor = vec4(fragColor.rgb, fragColor.a * alpha);
}