Weekly update #5: Upgrades on blocks


Unfortunately, I was unexpectedly busy this week. So there are no new blocks as I promised but will (hopefully) do next week.

What's new

  • Reference variable
  • Dynamic gradient offset and color
  • Voronoi Point Offset


Introducing Reference
A reference is an alias to a variable, so if you modify a reference, the original variable will be modified too. Here's an example

You see, I'm using the Get Channel block to get the alpha of main image and set it as a reference, so when I multiply it, the alpha of main image gets multiplied too. If I uncheck the "As Reference", it will create a new actual variable and copy the value of main image's alpha, so if I multiply that new variable, only that variable will be affected.

Here's another example of creating dissolve effect using reference:

References are useful for referencing a vector component, that way you don't have to get channel, do some stuff, then manually set it to the original variable. This is a Shaderblocks-special feature, because actually there is no reference in Godot Shader Language or GLSL.
Currently references can only be created using the Get Channel block, but next week there will be a block for that.

Dynamic Gradient
Gradients in Shaderblocks are shader-based, but what is the point of it if you can't dynamically change their value? That's why we are exposing the offset and color as parameters so you can use expressions for them.


Voronoi Point Offset
Voronoi noises now have Point Offset parameter, which can be used to create water shader


Bug fix: 3D noises are not saved
The data of 3D noises such as Z Offset are not saved, and now it has been fixed.


Bug hunt: Variables with default names are not loaded properly
Sometimes I encountered an issue where I saved a Shaderblocks file and the variable names are default, then when I load it, it becomes messed up. But now I can't seem to reproduce the issue anymore, so if anyone encountered this, please report it to me.
Update: This has been fixed.

Files

Shaderblocks-Windows.zip 15 MB
Nov 11, 2022
Shaderblocks-Linux.zip 19 MB
Nov 11, 2022

Get Shaderblocks

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.