mirror of
https://github.com/stemoretti/BaseUI.git
synced 2025-07-18 13:04:20 -04:00
Heavy changes
This commit is contained in:
23
qml/shaders/clock.frag
Normal file
23
qml/shaders/clock.frag
Normal file
@ -0,0 +1,23 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 qt_TexCoord0;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
vec2 pos;
|
||||
float radius;
|
||||
vec4 color;
|
||||
float dpi;
|
||||
} ubuf;
|
||||
|
||||
layout(binding = 2) uniform sampler2D maskSource;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (distance(gl_FragCoord.xy / ubuf.dpi, ubuf.pos + ubuf.radius) < ubuf.radius)
|
||||
fragColor = ubuf.color * texture(maskSource, qt_TexCoord0).a * ubuf.qt_Opacity;
|
||||
else
|
||||
fragColor = texture(maskSource, qt_TexCoord0).rgba * ubuf.qt_Opacity;
|
||||
}
|
17
qml/shaders/icon.frag
Normal file
17
qml/shaders/icon.frag
Normal file
@ -0,0 +1,17 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 qt_TexCoord0;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float qt_Opacity;
|
||||
vec4 color;
|
||||
} ubuf;
|
||||
|
||||
layout(binding = 2) uniform sampler2D maskSource;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = ubuf.color * texture(maskSource, qt_TexCoord0).a * ubuf.qt_Opacity;
|
||||
}
|
Reference in New Issue
Block a user