Biweekly update #8
What's new
Not much has been added or changed in this update, most of the week was spent on refactoring, even though most of them are reverted 🥲 but here's it:
- Improved keyboard experience
- Revamped comment block
- New block: Steps
- Unsaved warning
- "Previous" is now a shortcut rather than a mode
- Proper math operation
- Bug fixes:
- Fixed drag hint height doesn't change properly
- Fixed color param still visible on Blend block
- Fixed non-existent components being shown on Swap block
Improved keyboard experience
You can now search for block using F6 key (maybe for now, if you have a better shortcut suggestion please tell us). You can also navigate the block menu using arrow keys, and pressing enter will add them to your shader. But before it's added, you can also use your keyboard to set where you want to place it, or press escape if you want to cancel it. And then press enter again to actually add it.
Revamped comment block
- When added, it will automatically focus and enters editing mode
- Pressing enter now confirms the comment text instead of adding a new line. To add a new line, press shift + enter.
- Changed the color to gray. Because it doesn't do anything, so we think gray will fit with it
New block: Steps
This block is like Quantization or stepify() in GDScript, except that it ranges from 0 to 1. For example, x is a gradvient from 0-1, and the steps is 3, then the possible output would be 0.0, 0.5, or 1.0. On GDScript stepify() function, it would be 0.0, 0.333, or 0.667. There will be 1 but x must be above 1 and on our gradient, it's not going to be visible.
Some example use cases of this are:
- Posterization
- Making Time unsmooth
- Pixelation, even though we already have Pixelate block but it uses the same formula as this block
Unsaved warning
When you want to create a new file, open, or close Shaderblocks, it will give you a warning if your file is modified but not saved.
"Apply to Previous" is now just a shortcut
When you set Apply to Previous, now it will just select the variable of previous block instead of being always previous because it doesn't make sense at all.
Proper Math Operation (breaks compatibility)
From the block above, we're pretty sure that you will expect it to multiply Gbot Grayscale by 0.7 (1 - 0.3 = 0.7). But on previous versions, it doesn't work like that. The result will be like this
That's because expressions are just code injection, so the result will be Gbot Grayscale multiplied by 1 and then subtracted by 0.3. Starting from this version, Shaderblocks will automatically put parentheses on A and/or B if it's an expression that has an arithmetic operation to keep operation order.
Before:
After:
Bug fix: Drag hint height not changing properly
This happens after you added a comment then you drag a block or vise versa. The drag hint height doesn't change.
Bug fix: Color param still visible on Blend block
When you change the blend mode to intersect, erase or any blend mode that doesn't need B, B option is hidden but the color param is still there.
Bug fix: Swap block showing components that aren't supposed to be there
For example, you want to swap a Vector2, you can swap the channels with not only its red or green channel, but also blue and alpha. And of course this will create an error
Files
Get Shaderblocks
Shaderblocks
Make shaders by drag and drop
More posts
- Shaderblocks Dev 11: Introducing UniformsJun 15, 2023
- Biweekly update #10: Huge changes, internallyMar 13, 2023
- Biweekly update #9: We're backFeb 04, 2023
- Biweekly update #7: Improved quality of lifeDec 04, 2022
- Weekly update #6: More blocksNov 22, 2022
- Weekly update #5: Upgrades on blocksNov 11, 2022
- Weekly update #4: Up to 3 times faster!Nov 04, 2022
- Weekly update #3Oct 28, 2022
- Weekly update #2Oct 21, 2022
Leave a comment
Log in with itch.io to leave a comment.