diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-06 21:44:56 +0100 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-11-06 21:44:56 +0100 |
commit | 9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3 (patch) | |
tree | eb3c73ca2fdcdcb2a7ede69ae066c289d3f14883 /web/pw-visualizer/assets/shaders/frag/msdf.glsl | |
parent | fdc2ab9421c6a38c6bbd9b621c4da4f2c147a773 (diff) | |
download | planetwars.dev-9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3.tar.xz planetwars.dev-9ed7d7ab2fc70f971aa18d61f5ea04b346c836a3.zip |
render planet names
Diffstat (limited to 'web/pw-visualizer/assets/shaders/frag/msdf.glsl')
-rw-r--r-- | web/pw-visualizer/assets/shaders/frag/msdf.glsl | 3 |
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 |