Archived
1
0
Fork 0

first and last commit

This commit is contained in:
Sen 2025-09-02 14:43:36 +02:00
commit c9e78fd810
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
381 changed files with 37141 additions and 0 deletions

20
shaders/rect.fsh Normal file
View file

@ -0,0 +1,20 @@
out vec4 FragColor;
in vec2 tex_coord;
uniform vec2 size;
uniform sampler2D tex;
uniform bool use_tex;
uniform float border;
uniform vec4 fill_t;
uniform vec4 fill_b;
uniform vec4 border_t;
uniform vec4 border_b;
void main() {
vec2 tex_pos = tex_coord * size;
if(tex_pos.x < border || tex_pos.x > (size.x - border) || tex_pos.y < border || tex_pos.y > (size.y - border))
FragColor = mix(border_t, border_b, tex_coord.y);
else
FragColor = (use_tex ? texture(tex, (tex_coord - (border / size)) * (size / (size - (border * 2.0)))) : vec4(1.0)) * mix(fill_t, fill_b, tex_coord.y);
}