2024-06-10 10:02:51 +02:00
|
|
|
function Node_Honeycomb_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
|
|
|
name = "Honeycomb Noise";
|
|
|
|
shader = sh_noise_honey;
|
|
|
|
|
2024-08-18 09:13:41 +02:00
|
|
|
newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ]))
|
2024-06-10 10:02:51 +02:00
|
|
|
.setUnitRef(function(index) { return getDimension(index); });
|
|
|
|
addShaderProp(SHADER_UNIFORM.float, "position");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(2, nodeValue_Vec2("Scale", self, [ 2, 2 ]));
|
2024-06-10 10:02:51 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(3, nodeValue_Rotation("Rotation", self, 0));
|
2024-06-10 10:02:51 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "rotation");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(4, nodeValue_Enum_Button("Mode", self, 0, [ "Hexagon", "Star" ]));
|
2024-06-10 10:02:51 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.integer, "mode");
|
|
|
|
|
2024-11-07 07:59:04 +01:00
|
|
|
newInput(5, nodeValueSeed(self));
|
2024-06-10 10:02:51 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(6, nodeValue_Int("Iteration", self, 1));
|
2024-06-10 10:02:51 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
|
|
|
|
|
|
|
input_display_list = [ 5,
|
|
|
|
["Output", true], 0,
|
|
|
|
["Noise", false], 1, 2, 3, 4, 6.
|
|
|
|
];
|
|
|
|
|
|
|
|
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
2024-07-02 12:18:32 +02:00
|
|
|
var _hov = false;
|
2024-08-08 06:57:51 +02:00
|
|
|
var hv = inputs[1].drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); _hov |= hv;
|
2024-07-02 12:18:32 +02:00
|
|
|
|
|
|
|
return _hov;
|
2024-06-10 10:02:51 +02:00
|
|
|
}
|
|
|
|
}
|