Pixel-Composer/scripts/node_noise_bubble/node_noise_bubble.gml

34 lines
1.3 KiB
Text
Raw Normal View History

2024-02-03 13:11:50 +01:00
function Node_Noise_Bubble(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
name = "Bubble Noise";
shader = sh_noise_bubble;
2024-08-18 09:13:41 +02:00
newInput(1, nodeValue_Float("Density", self, 0.5 ))
2024-02-03 13:11:50 +01:00
.setDisplay(VALUE_DISPLAY.slider);
addShaderProp(SHADER_UNIFORM.float, "density");
2024-08-18 09:13:41 +02:00
newInput(2, nodeValue_Float("Seed", self, seed_random(6)))
2024-08-08 06:57:51 +02:00
.setDisplay(VALUE_DISPLAY._default, { side_button : button(function() { randomize(); inputs[2].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
2024-02-03 13:11:50 +01:00
addShaderProp(SHADER_UNIFORM.float, "seed");
2024-08-18 06:16:20 +02:00
newInput(3, nodeValue_Slider_Range("Scale", self, [ 0.5, 0.8 ] ));
2024-02-03 13:11:50 +01:00
addShaderProp(SHADER_UNIFORM.float, "scale");
2024-08-18 09:13:41 +02:00
newInput(4, nodeValue_Float("Thickness", self, 0 ))
2024-02-03 13:11:50 +01:00
.setDisplay(VALUE_DISPLAY.slider);
addShaderProp(SHADER_UNIFORM.float, "thickness");
2024-08-18 06:16:20 +02:00
newInput(5, nodeValue_Enum_Button("Mode", self, 0 , [ "Line", "Fill" ] ));
2024-02-03 13:11:50 +01:00
addShaderProp(SHADER_UNIFORM.integer, "mode");
2024-08-18 06:16:20 +02:00
newInput(6, nodeValue_Slider_Range("Opacity", self, [ 0., 1. ] ));
2024-02-03 13:11:50 +01:00
addShaderProp(SHADER_UNIFORM.float, "alpha");
2024-08-18 06:16:20 +02:00
newInput(7, nodeValue_Enum_Scroll("Blending", self, 0 , [ "Max", "Add" ] ));
2024-02-04 07:33:42 +01:00
addShaderProp(SHADER_UNIFORM.integer, "render");
2024-02-03 13:11:50 +01:00
input_display_list = [ 2,
["Output", true], 0,
["Noise", false], 1, 3,
2024-02-04 07:33:42 +01:00
["Render", false], 5, 4, 6, 7,
2024-02-03 13:11:50 +01:00
];
}