Major changes
- A new web UI, with a menu to select flags. It shows side-by-side how the shader with minified, with hypertext links to better track variables after renaming.
- Better support for interface blocks (#237).
- kkpView symbol generation for integration in kkpview (usable with kkrunchy and crinkler)
- Better minification through variable reuse, more inlining, more variable shadowing, and more.
- Better tracking of side-effects in the code, which leads to better and safer optimizations.
- Multithreading to make Shader Minifier faster when minifying multiple files together.
- A .NET API, for example if you want to plug the minifier in your C# tool.
- And a bunch of bug fixes!
What's Changed
Main changes include:
- Fix case parsing problem by @eldritchconundrum in #319
- Add basic support for interface blocks by @laurentlb in #335
- Fix #333, export kkpView symbol maps by @eldritchconundrum in #337
- Fix newline issue when declaring a type by @laurentlb in #336
- Update precedence of assign ops relative to the ternary operator by @laurentlb in #344
- Add debugging traces by @eldritchconundrum in #345
- Peephole optims, var scoping (fixes #153) by @eldritchconundrum in #349
- Pure rewrite improvements by @eldritchconundrum in #353
- Simplify a+-b and a--b by @laurentlb in #354
- Beautiful & advanced web UI by @laurentlb in #355
- Expose JS API by @laurentlb in #360
- In a declaration, parenthesis are mandatory around a comma operator by @eldritchconundrum in #363
- Parse decl-less layout as verbatim. Fixes #22, #29 by @eldritchconundrum in #364
- Reuse var by @eldritchconundrum in #367
- Generalize reuse by @eldritchconundrum in #368
- Detect more augmentable operators by @laurentlb in #369
- Reuse function parameters inside the function by @laurentlb in #370
- Augmentable operators optimization: * is not always commutative by @laurentlb in #372
- Augmentable operators optimization: * is commutative when an operand is scalar by @therontarigo in #377
- Use function purity analysis in expression purity by @eldritchconundrum in #379
- Reassignments by @eldritchconundrum in #380
- Fixes #385 by @eldritchconundrum in #386
- Support compound assignments in reassignment detection by @eldritchconundrum in #384
- Shadow variables inside loops and if statements by @laurentlb in #387
- distance(x,y) => length(x-y) by @laurentlb in #392
- Remove the
--smoothstep
flag by @laurentlb in #391 - Remove unnecessary parentheses between ? and : in ternary expressions by @therontarigo in #396
- Rewrite pow(x, 1.0) as x by @eldritchconundrum in #399
- Better handling of spaces in preprocessor directives by @laurentlb in #404
- Printer: add space between + and ++ by @laurentlb in #405
- Keep operand order when removing parens around + and - operators by @laurentlb in #406
- Fix aggressive inlining bug by @eldritchconundrum in #408
- Fixes #317, inlining bugs by @eldritchconundrum in #409
- Fix while rewriting bug by @eldritchconundrum in #410
- Optims by @eldritchconundrum in #411
- Inlining by @eldritchconundrum in #412
- C# API by @laurentlb in #425
New Contributors
- @therontarigo made their first contribution in #377
Full Changelog: 1.3.6...1.4.0