aboutsummaryrefslogtreecommitdiff
path: root/web/pw-visualizer/assets/shaders
diff options
context:
space:
mode:
authorIlion Beyst <ilion.beyst@gmail.com>2022-11-06 21:44:56 +0100
committerIlion Beyst <ilion.beyst@gmail.com>2022-11-06 21:44:56 +0100
commit9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3 (patch)
treeeb3c73ca2fdcdcb2a7ede69ae066c289d3f14883 /web/pw-visualizer/assets/shaders
parentfdc2ab9421c6a38c6bbd9b621c4da4f2c147a773 (diff)
downloadplanetwars.dev-9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3.tar.xz
planetwars.dev-9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3.zip
render planet names
Diffstat (limited to 'web/pw-visualizer/assets/shaders')
-rw-r--r--web/pw-visualizer/assets/shaders/frag/msdf.glsl3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/pw-visualizer/assets/shaders/frag/msdf.glsl b/web/pw-visualizer/assets/shaders/frag/msdf.glsl
index 5d2325b..23bacfc 100644
--- a/web/pw-visualizer/assets/shaders/frag/msdf.glsl
+++ b/web/pw-visualizer/assets/shaders/frag/msdf.glsl
@@ -24,6 +24,7 @@ void main() {
float sd = median(msd.r, msd.g, msd.b);
float screenPxRange = max(u_distanceRange, scale);
float screenPxDistance = screenPxRange*(sd - 0.5);
- float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
+ // float opacity = clamp(screenPxDistance + 0.5, 0.0, 1.0);
+ float opacity = clamp(0.0, 1.0, screenPxDistance + 0.5);
gl_FragColor = vec4(u_fgColor.rgb, u_fgColor.a * opacity);
} \ No newline at end of file