Karsten Schmidt<p><a href="https://mastodon.thi.ng/tags/ReleaseFriday" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ReleaseFriday</span></a> 🚀 - This week's <a href="https://mastodon.thi.ng/tags/ThingUmbrella" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ThingUmbrella</span></a> releases are mainly related to ShaderAST & ongoing repo-wide documentation updates of all 190 packages...</p><p><a href="https://thi.ng/shader-ast" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/shader-ast</span><span class="invisible"></span></a> — Added polymorphic syntax sugar versions of various math ops to simplify "self-assignments" aka ops in the form of `x = x+ 2`, which would in shader AST syntax looked like `assign(x, add(x, 2))`, now `addSelf(x, 2)`... See changelog & docs for details of supported ops.</p><p><a href="https://thi.ng/shader-ast-stdlib" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/shader-ast-stdlib</span><span class="invisible"></span></a> — The "standard library" for <a href="https://thi.ng/shader-ast" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/shader-ast</span><span class="invisible"></span></a> has had several new additions of useful helpers & metaprogramming tools, e.g. a new `branches()` function (see screenshot) to simplify n-ary A/B testing of params (or debugging of shader outputs) as is commonly done by e.g. visualizing different versions as columns based on fragment position. Other additions include surface normal calculation from a 2D terrain/grayscale texture (e.g. for GIS or fluid sims), float packing/unpacking (to/from 8bit/channel RGBA textures as a lot of mobile devices _still_ don't support float render textures in WebGL)...</p><p><a href="https://thi.ng/shader-ast-optimize" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/shader-ast-optimize</span><span class="invisible"></span></a> — This package is used to apply various optimizations on a given shader AST program (or expression). Recursive constant folding has been extended to more ops & built-in functions. There's also a new wrapper function `defOptimized()` which can be used in place of `defMain()` to create auto-optimized shader main functions. The new version also has several bug fixes and more tests... See updated readme for examples.</p><p>As mentioned in earlier toots, I've also been doing several large rounds/commits of general documentation related updates/revamps, incl. updating all code examples in readmes & API docs to provide all required import statements, writing a new tooling (see below) to extract said code blocks from their original files and export them to their own source files for easier testing/trying them out from the command line. That work is only partially completed (with still hundreds of files to edit/update), but if you've got a clone of the <a href="https://thi.ng/umbrella" rel="nofollow noopener" translate="no" target="_blank"><span class="invisible">https://</span><span class="">thi.ng/umbrella</span><span class="invisible"></span></a> repo, you can already try it out by running `yarn tool:tangle` (to extract examples from API docs in source files) or `yarn doc:readme` (to extract from readmes). In both cases, make sure your first build everything via `yarn build`. The tools will log where each of the examples is written to. Once I'm done, there will be ~800 example files extracted via this process... 💪</p><p><a href="https://mastodon.thi.ng/tags/TypeScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>TypeScript</span></a> <a href="https://mastodon.thi.ng/tags/JavaScript" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>JavaScript</span></a> <a href="https://mastodon.thi.ng/tags/ShaderAST" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>ShaderAST</span></a> <a href="https://mastodon.thi.ng/tags/WebGL" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>WebGL</span></a> <a href="https://mastodon.thi.ng/tags/Documentation" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>Documentation</span></a> <a href="https://mastodon.thi.ng/tags/OpenSource" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>OpenSource</span></a></p>