git-svn-id: svn://db.shs.com.ru/libs@626 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2019-11-22 15:20:52 +00:00
parent 5e2b563d57
commit 09248aae34
128 changed files with 16038 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
// vert //
void main(void) {
qgl_FragTexture = qgl_Texture;
gl_Position = qgl_ftransform();
}
// frag //
uniform vec2 dt, size;
uniform float thickness;
void main(void) {
vec2 frame_size = size / dt;
vec2 pix_pos = qgl_FragTexture * frame_size;
vec2 frame = vec2(1) + step(pix_pos, vec2(thickness)) - step(pix_pos, frame_size - vec2(thickness));
vec2 line = frame * step(0.5, fract(pix_pos.yx / thickness / 4.));
float fc = max(frame.x, frame.y);
float fl = max(line.x , line.y );
fl = mix(1, fl, fc);
qgl_FragColor = vec4(vec3(fl), fc * 0.8 + 0.2);
//qgl_FragColor = vec4(vec3(fl,0),1);
}