Skip to content

Commit

Permalink
🟦 [Nodes] Tweak nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFouchy committed Jan 6, 2024
1 parent fbaa8ae commit 078efd1
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Nodes/21 Greyscale Modifier/Square Wave.clbnode
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// To learn how to write nodes, see https://coollab-art.com/Tutorials/Writing%20Nodes/Intro
INPUT float 'Period';
INPUT float 'Fraction of time when Min value is active';
INPUT float 'Duration of Min';
INPUT float 'Min';
INPUT float 'Max';

float main(float x)
{
x = mod(x, 'Period');
return x < 'Period' * 'Fraction of time when Min value is active'
return x < 'Period' * 'Duration of Min'
? 'Min'
: 'Max';
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
{
"index": 2,
"data": {
"Name": "Fraction of time when Min value is active",
"Name": "Duration of Min",
"Value": 0.5,
"Metadata": {
"Bounds": {
Expand Down
7 changes: 4 additions & 3 deletions Nodes/33 Shape Renderer/Derivative.clbnode
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ sRGB main(UV uv)
float h = 0.001;

vec2 gradient = vec2(
'Shape'(uv-vec2(h,0)) - 'Shape'(uv+vec2(h,0)),
'Shape'(uv-vec2(0,h)) - 'Shape'(uv+vec2(0,h))
) / (2. * h);
'Shape'(uv - vec2(h, 0)) - 'Shape'(uv + vec2(h, 0)),
'Shape'(uv - vec2(0, h)) - 'Shape'(uv + vec2(0, h))
)
/ (2. * h);

return vec3(gradient * .5 + .5, 0.);
}
11 changes: 11 additions & 0 deletions Nodes/70 Input/Input Vec4.clbnode
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// To learn how to write nodes, see https://coollab-art.com/Tutorials/Writing%20Nodes/Intro

INPUT float 'X';
INPUT float 'Y';
INPUT float 'Z';
INPUT float 'W';

vec4 main()
{
return vec4('X', 'Y', 'Z', 'W');
}
File renamed without changes.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
- ✨ Improved the randomness of our Random and Noise nodes.
- ✨ Prevent mouse from getting blocked on the screen edges while dragging a widget or the camera. Instead the mouse wraps around.
- ✨ Prevent mouse from getting blocked on the screen edges while dragging a node or a link or a selection rectangle in the nodes view. Instead the canvas starts translating.
- ✨ Greatly improved quite a few nodes, most notably "Glow".
- ✨ Added quite a few nodes, most notably "Blur" and "Adaptive Halftone".
- 🀏 You can now pan the Nodes view with the middle mouse button (and you can still use the right button as you used to).
- ✨ Added A4/A3/A2/A1 aspect ratio (when selecting the size of the View and the exported images).
- πŸ› Fixed crash on Windows when exporting an image was taking longer than 2 seconds.
Expand Down

0 comments on commit 078efd1

Please sign in to comment.