Pixel-Composer/scripts/node_noise_blue/node_noise_blue.gml

32 lines
786 B
Text
Raw Normal View History

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,
];
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 ];
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();
surface_reset_shader();
return _outSurf;
}
}