Posted March 13, 2023 by IntakeOVR
We're a bit late again this time but here we go.
This update doesn't bring many new things for the user experience, but this is actually a pretty big update especially for the internal part.
What's new
Bug fixes and changes
Optimization
We did some optimizations, one of them is the Input Block. Now the "UV Repeat" param is a static param, meaning that it will regenerate the shader code everytime you toggle it. Previously it uses a boolean uniform and a conditional, if true then the shader will repeat the UV. With this we don't have to regenerate the shader when we toggle it, but since using a conditional could slow down the shader performance, we decided to make it static instead.
Color and Modulate are now saved
Thanks to JSON, we can safely add these properties to the save file without creating chaos in our codebase.
The value of <value> is now saved on float params, UV Transform block, and Choose block
This is actually something we forgot to implement on the previous release, but again thanks JSON because implementing this is much easier than it would. The float param is now saved as a dictionary that contains user-written expression and the actual value (float).
For those two blocks, they used a special, custom property to store their array but since JSON has built-in array, they don't have to be custom property anymore and they're now saved as regular param.
WARNING: THIS VERSION IS NOT COMPATIBLE WITH FILE VERSION 8 OR OLDER
Since we've completely changed our file format, of course this version wouldn't be compatible with the old format anymore.
However, this version can open SBL file version 9 which is saved from Shaderblocks Biweekly #9 build. This is done by internally converting them to the new format. For now the converter only support SBL version 9, it can't convert older version yet because the SBL format constantly changes from version to version. But don't worry they will be supported on the next release.
So if you want to open your file but it's older than version 9, you can open and resave it on the Shaderblocks Biweekly #9 build, this will upgrade the file format to version 9 so you will be able to open it in this new version.