aboutsummaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2020-10-17 13:42:31 +0200
committerdec05eba <dec05eba@protonmail.com>2020-10-17 14:56:41 +0200
commit4a7b86829025664f6eeef6fcb5fc0894733f2ad6 (patch)
treeefd29796ec64b31609640dfea633e3ada982ee1d /shaders
parent9bf163d51a252fb5a611e88c2e0b4123a98169e1 (diff)
Matrix: make displayname more bright, add circle mask shader for avatar and room thumbnails
Diffstat (limited to 'shaders')
-rw-r--r--shaders/circle_mask.glsl9
1 files changed, 9 insertions, 0 deletions
diff --git a/shaders/circle_mask.glsl b/shaders/circle_mask.glsl
new file mode 100644
index 0000000..9f82591
--- /dev/null
+++ b/shaders/circle_mask.glsl
@@ -0,0 +1,9 @@
+uniform sampler2D texture;
+
+void main() {
+ vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);
+ vec2 pixelOffset = gl_TexCoord[0].xy - vec2(0.5, 0.5);
+ float dist = sqrt(dot(pixelOffset, pixelOffset));
+ dist = smoothstep(0.47, 0.5, dist);
+ gl_FragColor = gl_Color * pixel * vec4(1.0, 1.0, 1.0, 1.0 - dist);
+}