2024-06-09 07:49:43 +02:00
|
|
|
function Node_Noise_Cristal(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
|
|
|
name = "Cristal Noise";
|
|
|
|
shader = sh_noise_cristal;
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ] ));
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "position");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(2, nodeValue_Vec2("Scale", self, [ 1, 1 ] ));
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
|
|
|
|
2024-08-18 09:13:41 +02:00
|
|
|
newInput(3, 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[3].setValue(seed_random(6)); }).setIcon(THEME.icon_random, 0, COLORS._main_icon) });
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(4, nodeValue_Int("Iteration", self, 15 ));
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(5, nodeValue_Color("Color", self, c_white ));
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.color, "color");
|
|
|
|
|
2024-08-18 09:13:41 +02:00
|
|
|
newInput(6, nodeValue_Float("Gamma", self, 1 ))
|
2024-06-09 07:49:43 +02:00
|
|
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] });
|
|
|
|
addShaderProp(SHADER_UNIFORM.float, "gamma");
|
|
|
|
|
2024-08-18 06:16:20 +02:00
|
|
|
newInput(7, nodeValue_Rotation("Phase", self, 0));
|
2024-06-09 07:49:43 +02:00
|
|
|
addShaderProp(SHADER_UNIFORM.float, "phase");
|
|
|
|
|
|
|
|
input_display_list = [ 3,
|
|
|
|
["Output", true], 0,
|
|
|
|
["Noise", false], 1, 2, 4, 7,
|
|
|
|
["Render", false], 5, 6,
|
|
|
|
];
|
|
|
|
}
|