Add the shaders

This commit is contained in:
2026-03-19 09:22:46 +01:00
parent 71563e8979
commit a28b7318d2
2 changed files with 40 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#version 460
layout(location = 0) in vec2 oUV;
layout(location = 1) in vec4 oColor;
uniform sampler2D tex;
layout(push_constant) uniform PushData {
int alfa;
} push;
out vec4 FragColor;
void main() {
vec4 tc = texture(tex, oUV);
if (push.alfa != 0) {
FragColor = vec4(oColor.rgb, tc.a * oColor.a);
} else {
FragColor = tc * oColor;
}
}