2024-12-30 07:09:13 +01:00
|
|
|
function Node_Noise_Blue(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
|
|
|
name = "Blue Noise";
|
|
|
|
|
|
|
|
newInput(0, nodeValue_Dimension(self));
|
|
|
|
|
|
|
|
newInput(1, nodeValueSeed(self));
|
|
|
|
|
|
|
|
input_display_list = [
|
|
|
|
["Output", false], 0,
|
2024-12-30 09:37:33 +01:00
|
|
|
["Noise", false], 1,
|
2024-12-30 07:09:13 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
newOutput(0, nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone));
|
|
|
|
|
|
|
|
attribute_surface_depth();
|
|
|
|
|
2024-12-30 09:37:33 +01:00
|
|
|
temp_surface = [ noone, noone ];
|
2024-12-30 07:09:13 +01:00
|
|
|
|
|
|
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
|
|
|
var _dim = _data[0];
|
|
|
|
var _sed = _data[1];
|
|
|
|
|
|
|
|
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
|
|
|
|
2024-12-30 09:37:33 +01:00
|
|
|
surface_set_shader(_outSurf, sh_noise_blue_interpret);
|
|
|
|
shader_set_f("seed", _sed);
|
|
|
|
draw_empty();
|
2024-12-30 07:09:13 +01:00
|
|
|
surface_reset_shader();
|
|
|
|
|
|
|
|
return _outSurf;
|
|
|
|
}
|
|
|
|
}
|