Pixel-Composer/scripts/node_caustic/node_caustic.gml

26 lines
886 B
Plaintext
Raw Normal View History

2023-11-22 15:25:36 +01:00
function Node_Caustic(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
name = "Caustic";
shader = sh_water_caustic;
2024-08-18 09:13:41 +02:00
newInput(1, nodeValue_Vec2("Position", self, [ 0, 0 ]))
2023-11-22 15:25:36 +01:00
.setUnitRef(function(index) { return getDimension(index); });
addShaderProp(SHADER_UNIFORM.float, "position");
2024-08-18 06:16:20 +02:00
newInput(2, nodeValue_Vec2("Scale", self, [ 4, 4 ]));
2023-11-22 15:25:36 +01:00
addShaderProp(SHADER_UNIFORM.float, "scale");
2024-11-07 07:59:04 +01:00
newInput(3, nodeValueSeed(self));
2023-11-22 15:25:36 +01:00
addShaderProp(SHADER_UNIFORM.float, "seed");
2024-11-07 07:59:04 +01:00
newInput(4, nodeValue_Float("Progress", self, 0));
2023-11-22 15:25:36 +01:00
addShaderProp(SHADER_UNIFORM.float, "progress");
2024-08-18 09:13:41 +02:00
newInput(5, nodeValue_Float("Detail", self, 1.24))
2023-11-22 15:25:36 +01:00
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] });
addShaderProp(SHADER_UNIFORM.float, "detail");
input_display_list = [
["Output", true], 0,
["Noise", false], 1, 2, 4, 5,
];
}