From cb8e5f5320a48bd2b0a9ab2ff251ece38e62db9d Mon Sep 17 00:00:00 2001 From: bvanroll Date: Sun, 23 Jun 2024 20:20:20 +0200 Subject: [PATCH 1/2] new snippets --- .vim/UltiSnips/glsl.snippets | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.vim/UltiSnips/glsl.snippets b/.vim/UltiSnips/glsl.snippets index a482ae2..1e3b55d 100644 --- a/.vim/UltiSnips/glsl.snippets +++ b/.vim/UltiSnips/glsl.snippets @@ -227,3 +227,14 @@ snippet fn_tile "tiles the screenspace" b vec2 tile(vec2 st, float tiles) {return fract(st*tiles)-.5; } endsnippet +snippet fn_star "star sdf function" b +float starSDF(vec2 st, float V, float s) { + st = st*2.; + float a = atan(st.y, st.x)/(2.*3.14159265359); + float seg = a * V; + a = ((floor(seg) + .5)/V + mix(s, -s,step(.5,fract(seg)))) * (2.*3.14159265359); + return abs(dot(vec2(cos(a),sin(a)),st)); +} +endsnippet + + From b1fe79d96fcfe3b1082950fe53533abc7efd1193 Mon Sep 17 00:00:00 2001 From: bvanroll Date: Sun, 23 Jun 2024 20:23:54 +0200 Subject: [PATCH 2/2] now use local references instead of absolute for symlinks --- .config/nvim/colors | 2 +- .config/nvim/init.vim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/nvim/colors b/.config/nvim/colors index 6c25432..3e27b6e 120000 --- a/.config/nvim/colors +++ b/.config/nvim/colors @@ -1 +1 @@ -/home/beppe/.vim/colors \ No newline at end of file +../../.vim/colors \ No newline at end of file diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 64a6e3f..71b3819 120000 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1 +1 @@ -/home/beppe/.vimrc \ No newline at end of file +../../.vimrc \ No newline at end of file