# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1701620786 -3600
# Node ID 0883358bc11dcb0712bf40e7b98c3d14c4cfb7d6
# Parent  1eb7cfefbeea094a920bdf0f65ec0630fa1c1610
new shader: soften-borders.frag

diff -r 1eb7cfefbeea -r 0883358bc11d shaders/soften-borders.frag
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/shaders/soften-borders.frag	Sun Dec 03 17:26:26 2023 +0100
@@ -0,0 +1,15 @@
+#version 330 core
+
+uniform  sampler2D  uTexture;
+in       vec2       vTextureXY;
+out      vec4       fColor;
+
+void main(){
+	fColor = texture(uTexture, vTextureXY).rgba;
+
+	float width = 0.01;
+	fColor.a *= smoothstep(0., 0.+width, vTextureXY.x);
+	fColor.a *= smoothstep(1., 1.-width, vTextureXY.x);
+	fColor.a *= smoothstep(0., 0.+width, vTextureXY.y);
+	fColor.a *= smoothstep(1., 1.-width, vTextureXY.y);
+}