mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 22:43:53 +01:00
38 lines
1.5 KiB
Plaintext
38 lines
1.5 KiB
Plaintext
function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
|
name = "Strand Noise";
|
|
shader = sh_noise_strand;
|
|
|
|
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
|
.setDisplay(VALUE_DISPLAY.vector)
|
|
.setUnitRef(function(index) { return getDimension(index); });
|
|
addShaderProp(SHADER_UNIFORM.float, "position");
|
|
|
|
inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
|
.setDisplay(VALUE_DISPLAY.slider);
|
|
addShaderProp(SHADER_UNIFORM.float, "density");
|
|
|
|
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, seed_random(4));
|
|
addShaderProp(SHADER_UNIFORM.float, "seed");
|
|
|
|
inputs[| 4] = nodeValue("Slope", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5 )
|
|
.setDisplay(VALUE_DISPLAY.slider);
|
|
addShaderProp(SHADER_UNIFORM.float, "slope");
|
|
|
|
inputs[| 5] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
|
.setDisplay(VALUE_DISPLAY.slider);
|
|
addShaderProp(SHADER_UNIFORM.float, "curve");
|
|
|
|
inputs[| 6] = nodeValue("Curve scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 );
|
|
addShaderProp(SHADER_UNIFORM.float, "curveDetail");
|
|
|
|
inputs[| 7] = nodeValue("Thickness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 )
|
|
.setDisplay(VALUE_DISPLAY.slider);
|
|
addShaderProp(SHADER_UNIFORM.float, "thickness");
|
|
|
|
input_display_list = [ 3,
|
|
["Output", true], 0,
|
|
["Noise", false], 1, 2, 4,
|
|
["Curve", false], 5, 6,
|
|
["Render", false], 7,
|
|
];
|
|
} |