- [3D Cylinder] Add option to disable end caps.
- Fold noise
|
@ -978,6 +978,7 @@
|
||||||
{"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},
|
{"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},
|
||||||
{"name":"sh_color_adjust","order":4,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",},
|
{"name":"sh_color_adjust","order":4,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",},
|
||||||
{"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},
|
{"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},
|
||||||
|
{"name":"d3d_cylinder_nocaps","order":9,"path":"scripts/d3d_cylinder_nocaps/d3d_cylinder_nocaps.yy",},
|
||||||
{"name":"s_node_regex_match","order":12,"path":"sprites/s_node_regex_match/s_node_regex_match.yy",},
|
{"name":"s_node_regex_match","order":12,"path":"sprites/s_node_regex_match/s_node_regex_match.yy",},
|
||||||
{"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",},
|
{"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",},
|
||||||
{"name":"sh_pixel_sort","order":21,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},
|
{"name":"sh_pixel_sort","order":21,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},
|
||||||
|
@ -1436,6 +1437,7 @@
|
||||||
{"name":"s_node_uv_remap","order":23,"path":"sprites/s_node_uv_remap/s_node_uv_remap.yy",},
|
{"name":"s_node_uv_remap","order":23,"path":"sprites/s_node_uv_remap/s_node_uv_remap.yy",},
|
||||||
{"name":"sh_fd_visualize_colorize_glsl","order":13,"path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",},
|
{"name":"sh_fd_visualize_colorize_glsl","order":13,"path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",},
|
||||||
{"name":"node_3d_light_point","order":2,"path":"scripts/node_3d_light_point/node_3d_light_point.yy",},
|
{"name":"node_3d_light_point","order":2,"path":"scripts/node_3d_light_point/node_3d_light_point.yy",},
|
||||||
|
{"name":"s_node_fold_noise","order":43,"path":"sprites/s_node_fold_noise/s_node_fold_noise.yy",},
|
||||||
{"name":"dynaSurf_circle_outline","order":1,"path":"scripts/dynaSurf_circle_outline/dynaSurf_circle_outline.yy",},
|
{"name":"dynaSurf_circle_outline","order":1,"path":"scripts/dynaSurf_circle_outline/dynaSurf_circle_outline.yy",},
|
||||||
{"name":"s_node_pb_draw_fill","order":14,"path":"sprites/s_node_pb_draw_fill/s_node_pb_draw_fill.yy",},
|
{"name":"s_node_pb_draw_fill","order":14,"path":"sprites/s_node_pb_draw_fill/s_node_pb_draw_fill.yy",},
|
||||||
{"name":"s_node_rate_remap","order":4,"path":"sprites/s_node_rate_remap/s_node_rate_remap.yy",},
|
{"name":"s_node_rate_remap","order":4,"path":"sprites/s_node_rate_remap/s_node_rate_remap.yy",},
|
||||||
|
@ -1919,6 +1921,7 @@
|
||||||
{"name":"draw_surface_functions","order":4,"path":"scripts/draw_surface_functions/draw_surface_functions.yy",},
|
{"name":"draw_surface_functions","order":4,"path":"scripts/draw_surface_functions/draw_surface_functions.yy",},
|
||||||
{"name":"node_rigid_variable","order":8,"path":"scripts/node_rigid_variable/node_rigid_variable.yy",},
|
{"name":"node_rigid_variable","order":8,"path":"scripts/node_rigid_variable/node_rigid_variable.yy",},
|
||||||
{"name":"project_function","order":2,"path":"scripts/project_function/project_function.yy",},
|
{"name":"project_function","order":2,"path":"scripts/project_function/project_function.yy",},
|
||||||
|
{"name":"node_fold_noise","order":14,"path":"scripts/node_fold_noise/node_fold_noise.yy",},
|
||||||
{"name":"s_node_zoom","order":48,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
|
{"name":"s_node_zoom","order":48,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
|
||||||
{"name":"node_noise_fbm","order":3,"path":"scripts/node_noise_fbm/node_noise_fbm.yy",},
|
{"name":"node_noise_fbm","order":3,"path":"scripts/node_noise_fbm/node_noise_fbm.yy",},
|
||||||
{"name":"sh_channel_V","order":6,"path":"shaders/sh_channel_V/sh_channel_V.yy",},
|
{"name":"sh_channel_V","order":6,"path":"shaders/sh_channel_V/sh_channel_V.yy",},
|
||||||
|
@ -1972,6 +1975,7 @@
|
||||||
{"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",},
|
{"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",},
|
||||||
{"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},
|
{"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},
|
||||||
{"name":"s_node_armature_path","order":17,"path":"sprites/s_node_armature_path/s_node_armature_path.yy",},
|
{"name":"s_node_armature_path","order":17,"path":"sprites/s_node_armature_path/s_node_armature_path.yy",},
|
||||||
|
{"name":"sh_noise_fold","order":14,"path":"shaders/sh_noise_fold/sh_noise_fold.yy",},
|
||||||
{"name":"s_node_gradient_palette","order":16,"path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},
|
{"name":"s_node_gradient_palette","order":16,"path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},
|
||||||
{"name":"FirebaseREST_asyncCall_Firestore","order":3,"path":"scripts/FirebaseREST_asyncCall_Firestore/FirebaseREST_asyncCall_Firestore.yy",},
|
{"name":"FirebaseREST_asyncCall_Firestore","order":3,"path":"scripts/FirebaseREST_asyncCall_Firestore/FirebaseREST_asyncCall_Firestore.yy",},
|
||||||
{"name":"FirebaseREST_firestore_value","order":16,"path":"scripts/FirebaseREST_firestore_value/FirebaseREST_firestore_value.yy",},
|
{"name":"FirebaseREST_firestore_value","order":16,"path":"scripts/FirebaseREST_firestore_value/FirebaseREST_firestore_value.yy",},
|
||||||
|
|
|
@ -1269,6 +1269,7 @@
|
||||||
{"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},},
|
{"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},},
|
||||||
{"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},},
|
{"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},},
|
||||||
{"id":{"name":"sh_fd_visualize_thick_smoke_glsl","path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},},
|
{"id":{"name":"sh_fd_visualize_thick_smoke_glsl","path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},},
|
||||||
|
{"id":{"name":"d3d_cylinder_nocaps","path":"scripts/d3d_cylinder_nocaps/d3d_cylinder_nocaps.yy",},},
|
||||||
{"id":{"name":"s_node_regex_match","path":"sprites/s_node_regex_match/s_node_regex_match.yy",},},
|
{"id":{"name":"s_node_regex_match","path":"sprites/s_node_regex_match/s_node_regex_match.yy",},},
|
||||||
{"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},},
|
{"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},},
|
||||||
{"id":{"name":"sh_pixel_sort","path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},},
|
{"id":{"name":"sh_pixel_sort","path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",},},
|
||||||
|
@ -1784,6 +1785,7 @@
|
||||||
{"id":{"name":"s_node_uv_remap","path":"sprites/s_node_uv_remap/s_node_uv_remap.yy",},},
|
{"id":{"name":"s_node_uv_remap","path":"sprites/s_node_uv_remap/s_node_uv_remap.yy",},},
|
||||||
{"id":{"name":"sh_fd_visualize_colorize_glsl","path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",},},
|
{"id":{"name":"sh_fd_visualize_colorize_glsl","path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",},},
|
||||||
{"id":{"name":"node_3d_light_point","path":"scripts/node_3d_light_point/node_3d_light_point.yy",},},
|
{"id":{"name":"node_3d_light_point","path":"scripts/node_3d_light_point/node_3d_light_point.yy",},},
|
||||||
|
{"id":{"name":"s_node_fold_noise","path":"sprites/s_node_fold_noise/s_node_fold_noise.yy",},},
|
||||||
{"id":{"name":"dynaSurf_circle_outline","path":"scripts/dynaSurf_circle_outline/dynaSurf_circle_outline.yy",},},
|
{"id":{"name":"dynaSurf_circle_outline","path":"scripts/dynaSurf_circle_outline/dynaSurf_circle_outline.yy",},},
|
||||||
{"id":{"name":"s_node_pb_draw_fill","path":"sprites/s_node_pb_draw_fill/s_node_pb_draw_fill.yy",},},
|
{"id":{"name":"s_node_pb_draw_fill","path":"sprites/s_node_pb_draw_fill/s_node_pb_draw_fill.yy",},},
|
||||||
{"id":{"name":"s_node_rate_remap","path":"sprites/s_node_rate_remap/s_node_rate_remap.yy",},},
|
{"id":{"name":"s_node_rate_remap","path":"sprites/s_node_rate_remap/s_node_rate_remap.yy",},},
|
||||||
|
@ -2347,6 +2349,7 @@
|
||||||
{"id":{"name":"sh_mask","path":"shaders/sh_mask/sh_mask.yy",},},
|
{"id":{"name":"sh_mask","path":"shaders/sh_mask/sh_mask.yy",},},
|
||||||
{"id":{"name":"node_rigid_variable","path":"scripts/node_rigid_variable/node_rigid_variable.yy",},},
|
{"id":{"name":"node_rigid_variable","path":"scripts/node_rigid_variable/node_rigid_variable.yy",},},
|
||||||
{"id":{"name":"project_function","path":"scripts/project_function/project_function.yy",},},
|
{"id":{"name":"project_function","path":"scripts/project_function/project_function.yy",},},
|
||||||
|
{"id":{"name":"node_fold_noise","path":"scripts/node_fold_noise/node_fold_noise.yy",},},
|
||||||
{"id":{"name":"s_node_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},},
|
{"id":{"name":"s_node_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},},
|
||||||
{"id":{"name":"migration_function","path":"scripts/migration_function/migration_function.yy",},},
|
{"id":{"name":"migration_function","path":"scripts/migration_function/migration_function.yy",},},
|
||||||
{"id":{"name":"node_noise_fbm","path":"scripts/node_noise_fbm/node_noise_fbm.yy",},},
|
{"id":{"name":"node_noise_fbm","path":"scripts/node_noise_fbm/node_noise_fbm.yy",},},
|
||||||
|
@ -2411,6 +2414,7 @@
|
||||||
{"id":{"name":"sh_ui_rotator","path":"shaders/sh_ui_rotator/sh_ui_rotator.yy",},},
|
{"id":{"name":"sh_ui_rotator","path":"shaders/sh_ui_rotator/sh_ui_rotator.yy",},},
|
||||||
{"id":{"name":"steam_ugc_functions","path":"scripts/steam_ugc_functions/steam_ugc_functions.yy",},},
|
{"id":{"name":"steam_ugc_functions","path":"scripts/steam_ugc_functions/steam_ugc_functions.yy",},},
|
||||||
{"id":{"name":"s_node_armature_path","path":"sprites/s_node_armature_path/s_node_armature_path.yy",},},
|
{"id":{"name":"s_node_armature_path","path":"sprites/s_node_armature_path/s_node_armature_path.yy",},},
|
||||||
|
{"id":{"name":"sh_noise_fold","path":"shaders/sh_noise_fold/sh_noise_fold.yy",},},
|
||||||
{"id":{"name":"s_node_gradient_palette","path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},},
|
{"id":{"name":"s_node_gradient_palette","path":"sprites/s_node_gradient_palette/s_node_gradient_palette.yy",},},
|
||||||
{"id":{"name":"FirebaseREST_asyncCall_Firestore","path":"scripts/FirebaseREST_asyncCall_Firestore/FirebaseREST_asyncCall_Firestore.yy",},},
|
{"id":{"name":"FirebaseREST_asyncCall_Firestore","path":"scripts/FirebaseREST_asyncCall_Firestore/FirebaseREST_asyncCall_Firestore.yy",},},
|
||||||
{"id":{"name":"FirebaseREST_firestore_value","path":"scripts/FirebaseREST_firestore_value/FirebaseREST_firestore_value.yy",},},
|
{"id":{"name":"FirebaseREST_firestore_value","path":"scripts/FirebaseREST_firestore_value/FirebaseREST_firestore_value.yy",},},
|
||||||
|
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
47
scripts/d3d_cylinder_nocaps/d3d_cylinder_nocaps.gml
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
function __3dCylinder_noCaps(radius = 0.5, height = 1, sides = 8, smooth = false) : __3dObject() constructor {
|
||||||
|
VF = global.VF_POS_NORM_TEX_COL;
|
||||||
|
render_type = pr_trianglelist;
|
||||||
|
object_counts = 1;
|
||||||
|
|
||||||
|
self.radius = radius;
|
||||||
|
self.height = height;
|
||||||
|
self.sides = sides;
|
||||||
|
self.smooth = smooth;
|
||||||
|
|
||||||
|
static initModel = function() {
|
||||||
|
var vs = array_create(3 * sides * 2);
|
||||||
|
var _h = height / 2;
|
||||||
|
|
||||||
|
for( var i = 0; i < sides; i++ ) {
|
||||||
|
var a0 = (i + 0) / sides * 360;
|
||||||
|
var a1 = (i + 1) / sides * 360;
|
||||||
|
|
||||||
|
var x0 = lengthdir_x(radius, a0);
|
||||||
|
var y0 = lengthdir_y(radius, a0);
|
||||||
|
var x1 = lengthdir_x(radius, a1);
|
||||||
|
var y1 = lengthdir_y(radius, a1);
|
||||||
|
|
||||||
|
var nx0 = smooth? lengthdir_x(1, a0) : lengthdir_x(1, (a0 + a1) / 2);
|
||||||
|
var ny0 = smooth? lengthdir_y(1, a0) : lengthdir_y(1, (a0 + a1) / 2);
|
||||||
|
var nx1 = smooth? lengthdir_x(1, a1) : lengthdir_x(1, (a0 + a1) / 2);
|
||||||
|
var ny1 = smooth? lengthdir_y(1, a1) : lengthdir_y(1, (a0 + a1) / 2);
|
||||||
|
|
||||||
|
var ux0 = (i + 0) / sides;
|
||||||
|
var ux1 = (i + 1) / sides;
|
||||||
|
|
||||||
|
vs[i * 3 * 2 + 0] = new __vertex(x0, y0, _h).setNormal(nx0, ny0, 0).setUV(ux0, 0);
|
||||||
|
vs[i * 3 * 2 + 1] = new __vertex(x0, y0, -_h).setNormal(nx0, ny0, 0).setUV(ux0, 1);
|
||||||
|
vs[i * 3 * 2 + 2] = new __vertex(x1, y1, _h).setNormal(nx1, ny1, 0).setUV(ux1, 0);
|
||||||
|
|
||||||
|
vs[i * 3 * 2 + 3] = new __vertex(x0, y0, -_h).setNormal(nx0, ny0, 0).setUV(ux0, 1);
|
||||||
|
vs[i * 3 * 2 + 4] = new __vertex(x1, y1, -_h).setNormal(nx1, ny1, 0).setUV(ux1, 1);
|
||||||
|
vs[i * 3 * 2 + 5] = new __vertex(x1, y1, _h).setNormal(nx1, ny1, 0).setUV(ux1, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
vertex = [ vs ];
|
||||||
|
|
||||||
|
VB = build();
|
||||||
|
} initModel();
|
||||||
|
|
||||||
|
static onParameterUpdate = initModel;
|
||||||
|
}
|
11
scripts/d3d_cylinder_nocaps/d3d_cylinder_nocaps.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "d3d_cylinder_nocaps",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "mesh",
|
||||||
|
"path": "folders/functions/3d/mesh.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -16,22 +16,34 @@ function Node_3D_Mesh_Cylinder(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _g
|
||||||
|
|
||||||
inputs[| in_mesh + 4] = nodeValue("Smooth Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false );
|
inputs[| in_mesh + 4] = nodeValue("Smooth Side", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false );
|
||||||
|
|
||||||
|
inputs[| in_mesh + 5] = nodeValue("End caps", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true );
|
||||||
|
|
||||||
input_display_list = [
|
input_display_list = [
|
||||||
__d3d_input_list_mesh, in_mesh + 0, in_mesh + 4,
|
__d3d_input_list_mesh, in_mesh + 0, in_mesh + 4, in_mesh + 5,
|
||||||
__d3d_input_list_transform,
|
__d3d_input_list_transform,
|
||||||
["Material", false], in_mesh + 1, in_mesh + 2, in_mesh + 3,
|
["Material", false], in_mesh + 1, in_mesh + 2, in_mesh + 3,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
static step = function() { #region
|
||||||
|
var _caps = getInputData(in_mesh + 5);
|
||||||
|
|
||||||
|
inputs[| in_mesh + 1].setVisible(_caps, _caps);
|
||||||
|
inputs[| in_mesh + 2].setVisible(_caps, _caps);
|
||||||
|
} #endregion
|
||||||
|
|
||||||
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
||||||
var _side = _data[in_mesh + 0];
|
var _side = _data[in_mesh + 0];
|
||||||
var _mat_top = _data[in_mesh + 1];
|
var _mat_top = _data[in_mesh + 1];
|
||||||
var _mat_bot = _data[in_mesh + 2];
|
var _mat_bot = _data[in_mesh + 2];
|
||||||
var _mat_sid = _data[in_mesh + 3];
|
var _mat_sid = _data[in_mesh + 3];
|
||||||
var _smt = _data[in_mesh + 4];
|
var _smt = _data[in_mesh + 4];
|
||||||
|
var _caps = _data[in_mesh + 5];
|
||||||
|
|
||||||
|
object_class = _caps? __3dCylinder : __3dCylinder_noCaps;
|
||||||
|
|
||||||
var object = getObject(_array_index);
|
var object = getObject(_array_index);
|
||||||
object.checkParameter({ sides: _side, smooth: _smt });
|
object.checkParameter({ sides: _side, smooth: _smt });
|
||||||
object.materials = [ _mat_top, _mat_bot, _mat_sid ];
|
object.materials = _caps? [ _mat_top, _mat_bot, _mat_sid ] : [ _mat_sid ];
|
||||||
|
|
||||||
setTransform(object, _data);
|
setTransform(object, _data);
|
||||||
|
|
||||||
|
|
34
scripts/node_fold_noise/node_fold_noise.gml
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
function Node_Fold_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
||||||
|
name = "Fold Noise";
|
||||||
|
shader = sh_noise_fold;
|
||||||
|
|
||||||
|
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("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 2 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Iteration", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 2)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 6, 1] });
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "iteration");
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue("Stretch", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2);
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "stretch");
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue("Amplitude", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.3)
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01] });
|
||||||
|
addShaderProp(SHADER_UNIFORM.float, "amplitude");
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Map" ]);
|
||||||
|
addShaderProp(SHADER_UNIFORM.integer, "mode");
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
["Output", true], 0,
|
||||||
|
["Noise", false], 1, 2, 3, 4, 5,
|
||||||
|
["Render", false], 6,
|
||||||
|
];
|
||||||
|
}
|
11
scripts/node_fold_noise/node_fold_noise.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_fold_noise",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "noise",
|
||||||
|
"path": "folders/nodes/data/generator/noise.yy",
|
||||||
|
},
|
||||||
|
}
|
12
scripts/node_fold_noise/node_gradient.yy
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"isDnD": false,
|
||||||
|
"isCompatibility": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/data/generator.yy",
|
||||||
|
},
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_gradient",
|
||||||
|
"tags": [],
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 5);
|
inputs[| 2] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 5);
|
||||||
|
|
||||||
inputs[| 3] = nodeValue("Raindrop width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 2 ])
|
inputs[| 3] = nodeValue("Raindrop width", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 1, 1 ])
|
||||||
.setDisplay(VALUE_DISPLAY.range);
|
.setDisplay(VALUE_DISPLAY.range);
|
||||||
|
|
||||||
inputs[| 4] = nodeValue("Raindrop length", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 5, 10 ])
|
inputs[| 4] = nodeValue("Raindrop length", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 5, 10 ])
|
||||||
|
@ -47,11 +47,13 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
|
|
||||||
inputs[| 16] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
inputs[| 16] = nodeValue("Alpha over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11);
|
||||||
|
|
||||||
|
inputs[| 17] = nodeValue("Fade alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||||
|
|
||||||
input_display_list = [ new Inspector_Sprite(s_MKFX), 0, 8,
|
input_display_list = [ new Inspector_Sprite(s_MKFX), 0, 8,
|
||||||
["Shape", false], 9, 3, 4, 10, 11,
|
["Shape", false], 9, 3, 4, 10, 11,
|
||||||
["Lifespan", false, 14], 15, 13, 16,
|
["Lifespan", false, 14], 15, 13, 16,
|
||||||
["Effect", false], 2, 1, 7,
|
["Effect", false], 2, 1, 7,
|
||||||
["Render", false], 5, 6,
|
["Render", false], 5, 6, 17,
|
||||||
];
|
];
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
@ -63,6 +65,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
inputs[| 4].setVisible(_shap == 0);
|
inputs[| 4].setVisible(_shap == 0);
|
||||||
inputs[| 10].setVisible(_shap == 1);
|
inputs[| 10].setVisible(_shap == 1);
|
||||||
inputs[| 11].setVisible(_shap == 2);
|
inputs[| 11].setVisible(_shap == 2);
|
||||||
|
inputs[| 17].setVisible(_shap == 0);
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||||
|
@ -85,6 +88,8 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var _life = _data[15];
|
var _life = _data[15];
|
||||||
var _alif = _data[16];
|
var _alif = _data[16];
|
||||||
|
|
||||||
|
var _afad = _data[17];
|
||||||
|
|
||||||
if(!is_surface(_surf)) return _outSurf;
|
if(!is_surface(_surf)) return _outSurf;
|
||||||
if(_shap == 2 && !is_surface(_text)) return _outSurf;
|
if(_shap == 2 && !is_surface(_text)) return _outSurf;
|
||||||
|
|
||||||
|
@ -113,9 +118,11 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
DRAW_CLEAR
|
DRAW_CLEAR
|
||||||
|
|
||||||
draw_surface(_surf, 0, 0);
|
draw_surface(_surf, 0, 0);
|
||||||
|
var _lcc = _cc;
|
||||||
|
|
||||||
|
if(_afad) BLEND_ADD
|
||||||
|
else BLEND_ALPHA_MULP
|
||||||
|
|
||||||
if(_1c) draw_set_color(_cc);
|
|
||||||
BLEND_ALPHA_MULP
|
|
||||||
repeat(_dens) {
|
repeat(_dens) {
|
||||||
random_set_seed(_seed); _seed += 100;
|
random_set_seed(_seed); _seed += 100;
|
||||||
|
|
||||||
|
@ -155,7 +162,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var _prg = _y_shf + _vel * prg;
|
var _prg = _y_shf + _vel * prg;
|
||||||
_prg = frac(_prg) - 0.5; // -0.5 - 0.5
|
_prg = frac(_prg) - 0.5; // -0.5 - 0.5
|
||||||
|
|
||||||
if(!_1c) draw_set_color(_colr.eval(random(1)));
|
if(!_1c) _lcc = _colr.eval(random(1));
|
||||||
var _aa = random_range(_alph[0], _alph[1]);
|
var _aa = random_range(_alph[0], _alph[1]);
|
||||||
|
|
||||||
var _clife = clamp((_prg + 0.5) / random_range(_life[0], _life[1]), 0, 1);
|
var _clife = clamp((_prg + 0.5) / random_range(_life[0], _life[1]), 0, 1);
|
||||||
|
@ -167,6 +174,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
_aaL = eval_curve_x(_alif, _clife);
|
_aaL = eval_curve_x(_alif, _clife);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_set_color(_lcc);
|
||||||
draw_set_alpha(_aa * _aaL);
|
draw_set_alpha(_aa * _aaL);
|
||||||
|
|
||||||
var _drpX = _rmx - _prg * _radHx * 2;
|
var _drpX = _rmx - _prg * _radHx * 2;
|
||||||
|
@ -183,8 +191,13 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
||||||
var _y0 = _drpY - _tr_span_h;
|
var _y0 = _drpY - _tr_span_h;
|
||||||
var _y1 = _y0 + _tr_span_h * 2 * _scaL;
|
var _y1 = _y0 + _tr_span_h * 2 * _scaL;
|
||||||
|
|
||||||
if(_drpW == 1) draw_line( _x0, _y0, _x1, _y1 );
|
if(_afad) {
|
||||||
else draw_line_width( _x0, _y0, _x1, _y1, _drpW );
|
if(_drpW == 1) draw_line_color( _x0, _y0, _x1, _y1, _lcc, c_black );
|
||||||
|
else draw_line_width_color( _x0, _y0, _x1, _y1, _drpW, _lcc, c_black );
|
||||||
|
} else {
|
||||||
|
if(_drpW == 1) draw_line( _x0, _y0, _x1, _y1 );
|
||||||
|
else draw_line_width( _x0, _y0, _x1, _y1, _drpW );
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 1 :
|
case 1 :
|
||||||
draw_circle(_drpX, _drpY, _drpW * _scaL, false);
|
draw_circle(_drpX, _drpY, _drpW * _scaL, false);
|
||||||
|
|
|
@ -639,6 +639,7 @@ function __initNodes() {
|
||||||
addNodeObject(generator, "Shard Noise", s_node_shard, "Node_Shard_Noise", [1, Node_Shard_Noise]).patreonExtra();
|
addNodeObject(generator, "Shard Noise", s_node_shard, "Node_Shard_Noise", [1, Node_Shard_Noise]).patreonExtra();
|
||||||
addNodeObject(generator, "Wavelet Noise", s_node_wavelet, "Node_Wavelet_Noise", [1, Node_Wavelet_Noise]).patreonExtra();
|
addNodeObject(generator, "Wavelet Noise", s_node_wavelet, "Node_Wavelet_Noise", [1, Node_Wavelet_Noise]).patreonExtra();
|
||||||
addNodeObject(generator, "Caustic", s_node_caustic, "Node_Caustic", [1, Node_Caustic]).patreonExtra();
|
addNodeObject(generator, "Caustic", s_node_caustic, "Node_Caustic", [1, Node_Caustic]).patreonExtra();
|
||||||
|
addNodeObject(generator, "Fold Noise", s_node_fold_noise, "Node_Fold_Noise", [1, Node_Fold_Noise]);
|
||||||
|
|
||||||
ds_list_add(generator, "Patterns");
|
ds_list_add(generator, "Patterns");
|
||||||
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");
|
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");
|
||||||
|
|
29
shaders/sh_noise_fold/sh_noise_fold.fsh
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
// Based on FabriceNeyret2 - plop 2 shader
|
||||||
|
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform vec2 position;
|
||||||
|
uniform vec2 scale;
|
||||||
|
|
||||||
|
uniform int iteration;
|
||||||
|
uniform float stretch;
|
||||||
|
uniform float amplitude;
|
||||||
|
|
||||||
|
uniform int mode;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 pos = v_vTexcoord * scale + position;
|
||||||
|
vec4 col = vec4(0., 0., 0., 1.);
|
||||||
|
|
||||||
|
for (int i = 0; i < iteration; i++) {
|
||||||
|
pos += cos( pos.yx * 3. + vec2(0.0, stretch)) / 3.;
|
||||||
|
pos += sin( pos.yx + vec2(stretch, 0.0)) / 2.;
|
||||||
|
pos *= amplitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(mode == 0) col += length(mod(pos, 2.) - 1.);
|
||||||
|
else col.xy += abs(mod(pos, 2.) - 1.);
|
||||||
|
|
||||||
|
gl_FragColor = col;
|
||||||
|
}
|
19
shaders/sh_noise_fold/sh_noise_fold.vsh
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough vertex shader
|
||||||
|
//
|
||||||
|
attribute vec3 in_Position; // (x,y,z)
|
||||||
|
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||||
|
attribute vec4 in_Colour; // (r,g,b,a)
|
||||||
|
attribute vec2 in_TextureCoord; // (u,v)
|
||||||
|
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||||
|
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||||
|
|
||||||
|
v_vColour = in_Colour;
|
||||||
|
v_vTexcoord = in_TextureCoord;
|
||||||
|
}
|
10
shaders/sh_noise_fold/sh_noise_fold.yy
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_noise_fold",
|
||||||
|
"parent": {
|
||||||
|
"name": "noise",
|
||||||
|
"path": "folders/shader/generator/noise.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 4.2 KiB |
74
sprites/s_node_fold_noise/s_node_fold_noise.yy
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMSprite",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "s_node_fold_noise",
|
||||||
|
"bbox_bottom": 63,
|
||||||
|
"bbox_left": 0,
|
||||||
|
"bbox_right": 63,
|
||||||
|
"bbox_top": 0,
|
||||||
|
"bboxMode": 0,
|
||||||
|
"collisionKind": 1,
|
||||||
|
"collisionTolerance": 0,
|
||||||
|
"DynamicTexturePage": false,
|
||||||
|
"edgeFiltering": false,
|
||||||
|
"For3D": false,
|
||||||
|
"frames": [
|
||||||
|
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"931ae6d1-f05f-4ec7-8169-0588c91fc363",},
|
||||||
|
],
|
||||||
|
"gridX": 0,
|
||||||
|
"gridY": 0,
|
||||||
|
"height": 64,
|
||||||
|
"HTile": false,
|
||||||
|
"layers": [
|
||||||
|
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"e6c7a40c-293d-493f-b20b-ad3e9d61af51","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||||
|
],
|
||||||
|
"nineSlice": null,
|
||||||
|
"origin": 4,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/icons/generator.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha": false,
|
||||||
|
"sequence": {
|
||||||
|
"resourceType": "GMSequence",
|
||||||
|
"resourceVersion": "1.4",
|
||||||
|
"name": "s_node_fold_noise",
|
||||||
|
"autoRecord": true,
|
||||||
|
"backdropHeight": 768,
|
||||||
|
"backdropImageOpacity": 0.5,
|
||||||
|
"backdropImagePath": "",
|
||||||
|
"backdropWidth": 1366,
|
||||||
|
"backdropXOffset": 0.0,
|
||||||
|
"backdropYOffset": 0.0,
|
||||||
|
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"eventStubScript": null,
|
||||||
|
"eventToFunction": {},
|
||||||
|
"length": 1.0,
|
||||||
|
"lockOrigin": false,
|
||||||
|
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"playback": 1,
|
||||||
|
"playbackSpeed": 30.0,
|
||||||
|
"playbackSpeedType": 0,
|
||||||
|
"showBackdrop": true,
|
||||||
|
"showBackdropImage": false,
|
||||||
|
"timeUnits": 1,
|
||||||
|
"tracks": [
|
||||||
|
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||||
|
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"931ae6d1-f05f-4ec7-8169-0588c91fc363","path":"sprites/s_node_fold_noise/s_node_fold_noise.yy",},},},"Disabled":false,"id":"778bbe68-ba17-49a5-8831-4d3ac2ea6460","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||||
|
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange": null,
|
||||||
|
"volume": 1.0,
|
||||||
|
"xorigin": 32,
|
||||||
|
"yorigin": 32,
|
||||||
|
},
|
||||||
|
"swatchColours": null,
|
||||||
|
"swfPrecision": 2.525,
|
||||||
|
"textureGroupId": {
|
||||||
|
"name": "Default",
|
||||||
|
"path": "texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type": 0,
|
||||||
|
"VTile": false,
|
||||||
|
"width": 64,
|
||||||
|
}
|