Project data

This commit is contained in:
Tanasart 2024-02-01 14:38:21 +07:00
parent 8930eadc63
commit 5755cff370
31 changed files with 516 additions and 27 deletions

View file

@ -388,6 +388,7 @@
{"name":"s_node_path_sample","order":3,"path":"sprites/s_node_path_sample/s_node_path_sample.yy",}, {"name":"s_node_path_sample","order":3,"path":"sprites/s_node_path_sample/s_node_path_sample.yy",},
{"name":"s_node_colorize","order":12,"path":"sprites/s_node_colorize/s_node_colorize.yy",}, {"name":"s_node_colorize","order":12,"path":"sprites/s_node_colorize/s_node_colorize.yy",},
{"name":"s_node_blobify","order":58,"path":"sprites/s_node_blobify/s_node_blobify.yy",}, {"name":"s_node_blobify","order":58,"path":"sprites/s_node_blobify/s_node_blobify.yy",},
{"name":"node_project_data","order":23,"path":"scripts/node_project_data/node_project_data.yy",},
{"name":"s_node_sepearte_shape","order":32,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",}, {"name":"s_node_sepearte_shape","order":32,"path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},
{"name":"s_node_websocket_send","order":21,"path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",}, {"name":"s_node_websocket_send","order":21,"path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},
{"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",}, {"name":"s_node_text_join","order":5,"path":"sprites/s_node_text_join/s_node_text_join.yy",},
@ -497,6 +498,7 @@
{"name":"panel_graph_connection_settings","order":6,"path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",}, {"name":"panel_graph_connection_settings","order":6,"path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},
{"name":"sh_d3d_wireframe","order":17,"path":"shaders/sh_d3d_wireframe/sh_d3d_wireframe.yy",}, {"name":"sh_d3d_wireframe","order":17,"path":"shaders/sh_d3d_wireframe/sh_d3d_wireframe.yy",},
{"name":"s_biterator_b_grey_short","order":8,"path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",}, {"name":"s_biterator_b_grey_short","order":8,"path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",},
{"name":"s_node_project_data","order":39,"path":"sprites/s_node_project_data/s_node_project_data.yy",},
{"name":"printer","order":2,"path":"scripts/printer/printer.yy",}, {"name":"printer","order":2,"path":"scripts/printer/printer.yy",},
{"name":"sh_de_stray","order":7,"path":"shaders/sh_de_stray/sh_de_stray.yy",}, {"name":"sh_de_stray","order":7,"path":"shaders/sh_de_stray/sh_de_stray.yy",},
{"name":"s_node_vfx_osc","order":14,"path":"sprites/s_node_vfx_osc/s_node_vfx_osc.yy",}, {"name":"s_node_vfx_osc","order":14,"path":"sprites/s_node_vfx_osc/s_node_vfx_osc.yy",},
@ -1416,6 +1418,7 @@
{"name":"s_node_pb_draw_roundrectangle","order":12,"path":"sprites/s_node_pb_draw_roundrectangle/s_node_pb_draw_roundrectangle.yy",}, {"name":"s_node_pb_draw_roundrectangle","order":12,"path":"sprites/s_node_pb_draw_roundrectangle/s_node_pb_draw_roundrectangle.yy",},
{"name":"node_trail","order":15,"path":"scripts/node_trail/node_trail.yy",}, {"name":"node_trail","order":15,"path":"scripts/node_trail/node_trail.yy",},
{"name":"FirebaseListenerUserFunctions_Firestore","order":2,"path":"scripts/FirebaseListenerUserFunctions_Firestore/FirebaseListenerUserFunctions_Firestore.yy",}, {"name":"FirebaseListenerUserFunctions_Firestore","order":2,"path":"scripts/FirebaseListenerUserFunctions_Firestore/FirebaseListenerUserFunctions_Firestore.yy",},
{"name":"s_node_shape_blur","order":7,"path":"sprites/s_node_shape_blur/s_node_shape_blur.yy",},
{"name":"FirebaseSetup","order":2,"path":"extensions/FirebaseSetup/FirebaseSetup.yy",}, {"name":"FirebaseSetup","order":2,"path":"extensions/FirebaseSetup/FirebaseSetup.yy",},
{"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",}, {"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",},
{"name":"s_node_caustic","order":35,"path":"sprites/s_node_caustic/s_node_caustic.yy",}, {"name":"s_node_caustic","order":35,"path":"sprites/s_node_caustic/s_node_caustic.yy",},
@ -1491,6 +1494,7 @@
{"name":"FirebaseFirestorePaths","order":2,"path":"scripts/FirebaseFirestorePaths/FirebaseFirestorePaths.yy",}, {"name":"FirebaseFirestorePaths","order":2,"path":"scripts/FirebaseFirestorePaths/FirebaseFirestorePaths.yy",},
{"name":"d3d_cylinder","order":2,"path":"scripts/d3d_cylinder/d3d_cylinder.yy",}, {"name":"d3d_cylinder","order":2,"path":"scripts/d3d_cylinder/d3d_cylinder.yy",},
{"name":"sh_palette_replace","order":25,"path":"shaders/sh_palette_replace/sh_palette_replace.yy",}, {"name":"sh_palette_replace","order":25,"path":"shaders/sh_palette_replace/sh_palette_replace.yy",},
{"name":"node_blur_shape","order":11,"path":"scripts/node_blur_shape/node_blur_shape.yy",},
{"name":"sh_cell_noise_random","order":3,"path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",}, {"name":"sh_cell_noise_random","order":3,"path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},
{"name":"node_iterator_input","order":1,"path":"scripts/node_iterator_input/node_iterator_input.yy",}, {"name":"node_iterator_input","order":1,"path":"scripts/node_iterator_input/node_iterator_input.yy",},
{"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",}, {"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",},
@ -1792,6 +1796,7 @@
{"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",}, {"name":"s_node_3d_cylinder","order":1,"path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},
{"name":"sh_pb_brick","order":9,"path":"shaders/sh_pb_brick/sh_pb_brick.yy",}, {"name":"sh_pb_brick","order":9,"path":"shaders/sh_pb_brick/sh_pb_brick.yy",},
{"name":"node_strand_break","order":9,"path":"scripts/node_strand_break/node_strand_break.yy",}, {"name":"node_strand_break","order":9,"path":"scripts/node_strand_break/node_strand_break.yy",},
{"name":"sh_blur_shape","order":12,"path":"shaders/sh_blur_shape/sh_blur_shape.yy",},
{"name":"s_biterator_b_grey_long","order":7,"path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",}, {"name":"s_biterator_b_grey_long","order":7,"path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",},
{"name":"sh_region_fill_color","order":1,"path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",}, {"name":"sh_region_fill_color","order":1,"path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",},
{"name":"s_node_vec_split","order":6,"path":"sprites/s_node_vec_split/s_node_vec_split.yy",}, {"name":"s_node_vec_split","order":6,"path":"sprites/s_node_vec_split/s_node_vec_split.yy",},

View file

@ -594,6 +594,7 @@
{"id":{"name":"s_node_colorize","path":"sprites/s_node_colorize/s_node_colorize.yy",},}, {"id":{"name":"s_node_colorize","path":"sprites/s_node_colorize/s_node_colorize.yy",},},
{"id":{"name":"s_node_blobify","path":"sprites/s_node_blobify/s_node_blobify.yy",},}, {"id":{"name":"s_node_blobify","path":"sprites/s_node_blobify/s_node_blobify.yy",},},
{"id":{"name":"panel_preview","path":"scripts/panel_preview/panel_preview.yy",},}, {"id":{"name":"panel_preview","path":"scripts/panel_preview/panel_preview.yy",},},
{"id":{"name":"node_project_data","path":"scripts/node_project_data/node_project_data.yy",},},
{"id":{"name":"s_node_sepearte_shape","path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},}, {"id":{"name":"s_node_sepearte_shape","path":"sprites/s_node_sepearte_shape/s_node_sepearte_shape.yy",},},
{"id":{"name":"s_node_websocket_send","path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},}, {"id":{"name":"s_node_websocket_send","path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},},
{"id":{"name":"s_node_text_join","path":"sprites/s_node_text_join/s_node_text_join.yy",},}, {"id":{"name":"s_node_text_join","path":"sprites/s_node_text_join/s_node_text_join.yy",},},
@ -719,6 +720,7 @@
{"id":{"name":"panel_graph_connection_settings","path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},}, {"id":{"name":"panel_graph_connection_settings","path":"scripts/panel_graph_connection_settings/panel_graph_connection_settings.yy",},},
{"id":{"name":"sh_d3d_wireframe","path":"shaders/sh_d3d_wireframe/sh_d3d_wireframe.yy",},}, {"id":{"name":"sh_d3d_wireframe","path":"shaders/sh_d3d_wireframe/sh_d3d_wireframe.yy",},},
{"id":{"name":"s_biterator_b_grey_short","path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",},}, {"id":{"name":"s_biterator_b_grey_short","path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",},},
{"id":{"name":"s_node_project_data","path":"sprites/s_node_project_data/s_node_project_data.yy",},},
{"id":{"name":"printer","path":"scripts/printer/printer.yy",},}, {"id":{"name":"printer","path":"scripts/printer/printer.yy",},},
{"id":{"name":"node_iterate","path":"scripts/node_iterate/node_iterate.yy",},}, {"id":{"name":"node_iterate","path":"scripts/node_iterate/node_iterate.yy",},},
{"id":{"name":"sh_de_stray","path":"shaders/sh_de_stray/sh_de_stray.yy",},}, {"id":{"name":"sh_de_stray","path":"shaders/sh_de_stray/sh_de_stray.yy",},},
@ -1761,6 +1763,7 @@
{"id":{"name":"FirebaseListenerUserFunctions_Firestore","path":"scripts/FirebaseListenerUserFunctions_Firestore/FirebaseListenerUserFunctions_Firestore.yy",},}, {"id":{"name":"FirebaseListenerUserFunctions_Firestore","path":"scripts/FirebaseListenerUserFunctions_Firestore/FirebaseListenerUserFunctions_Firestore.yy",},},
{"id":{"name":"byte_reader","path":"scripts/byte_reader/byte_reader.yy",},}, {"id":{"name":"byte_reader","path":"scripts/byte_reader/byte_reader.yy",},},
{"id":{"name":"node_3d_light_directional","path":"scripts/node_3d_light_directional/node_3d_light_directional.yy",},}, {"id":{"name":"node_3d_light_directional","path":"scripts/node_3d_light_directional/node_3d_light_directional.yy",},},
{"id":{"name":"s_node_shape_blur","path":"sprites/s_node_shape_blur/s_node_shape_blur.yy",},},
{"id":{"name":"FirebaseSetup","path":"extensions/FirebaseSetup/FirebaseSetup.yy",},}, {"id":{"name":"FirebaseSetup","path":"extensions/FirebaseSetup/FirebaseSetup.yy",},},
{"id":{"name":"json_prettify","path":"scripts/json_prettify/json_prettify.yy",},}, {"id":{"name":"json_prettify","path":"scripts/json_prettify/json_prettify.yy",},},
{"id":{"name":"s_node_caustic","path":"sprites/s_node_caustic/s_node_caustic.yy",},}, {"id":{"name":"s_node_caustic","path":"sprites/s_node_caustic/s_node_caustic.yy",},},
@ -1848,6 +1851,7 @@
{"id":{"name":"buffer_functions","path":"scripts/buffer_functions/buffer_functions.yy",},}, {"id":{"name":"buffer_functions","path":"scripts/buffer_functions/buffer_functions.yy",},},
{"id":{"name":"key_press","path":"scripts/key_press/key_press.yy",},}, {"id":{"name":"key_press","path":"scripts/key_press/key_press.yy",},},
{"id":{"name":"s_mk_sparkle_bg","path":"sprites/s_mk_sparkle_bg/s_mk_sparkle_bg.yy",},}, {"id":{"name":"s_mk_sparkle_bg","path":"sprites/s_mk_sparkle_bg/s_mk_sparkle_bg.yy",},},
{"id":{"name":"node_blur_shape","path":"scripts/node_blur_shape/node_blur_shape.yy",},},
{"id":{"name":"sh_mirror","path":"shaders/sh_mirror/sh_mirror.yy",},}, {"id":{"name":"sh_mirror","path":"shaders/sh_mirror/sh_mirror.yy",},},
{"id":{"name":"sh_cell_noise_random","path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},}, {"id":{"name":"sh_cell_noise_random","path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},},
{"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},}, {"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},},
@ -2198,6 +2202,7 @@
{"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},}, {"id":{"name":"s_node_3d_cylinder","path":"sprites/s_node_3d_cylinder/s_node_3d_cylinder.yy",},},
{"id":{"name":"sh_pb_brick","path":"shaders/sh_pb_brick/sh_pb_brick.yy",},}, {"id":{"name":"sh_pb_brick","path":"shaders/sh_pb_brick/sh_pb_brick.yy",},},
{"id":{"name":"node_strand_break","path":"scripts/node_strand_break/node_strand_break.yy",},}, {"id":{"name":"node_strand_break","path":"scripts/node_strand_break/node_strand_break.yy",},},
{"id":{"name":"sh_blur_shape","path":"shaders/sh_blur_shape/sh_blur_shape.yy",},},
{"id":{"name":"s_biterator_b_grey_long","path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",},}, {"id":{"name":"s_biterator_b_grey_long","path":"sprites/s_biterator_b_grey_long/s_biterator_b_grey_long.yy",},},
{"id":{"name":"sh_region_fill_color","path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",},}, {"id":{"name":"sh_region_fill_color","path":"shaders/sh_region_fill_color/sh_region_fill_color.yy",},},
{"id":{"name":"s_node_vec_split","path":"sprites/s_node_vec_split/s_node_vec_split.yy",},}, {"id":{"name":"s_node_vec_split","path":"sprites/s_node_vec_split/s_node_vec_split.yy",},},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -146,26 +146,28 @@ function __3dObject() constructor {
for( var i = 0, n = array_length(VB); i < n; i++ ) { for( var i = 0, n = array_length(VB); i < n; i++ ) {
var _ind = array_safe_get(material_index, i, i); var _ind = array_safe_get(material_index, i, i);
var _mat = array_safe_get(materials, _ind, noone); var _mat = array_safe_get(materials, _ind, noone);
var _useMat = is_instanceof(_mat, __d3dMaterial);
shader_set_i("mat_flip", texture_flip); shader_set_i("mat_flip", texture_flip);
var _tex = _mat == noone? -1 : _mat.getTexture(); var _tex = _useMat? _mat.getTexture() : -1;
if(_shader == sh_d3d_default) { if(_shader == sh_d3d_default) {
if(!is_instanceof(_mat, __d3dMaterial)) { if(_useMat) {
_mat.submitShader();
} else {
shader_set_f("mat_diffuse", 1); shader_set_f("mat_diffuse", 1);
shader_set_f("mat_specular", 0); shader_set_f("mat_specular", 0);
shader_set_f("mat_shine", 1); shader_set_f("mat_shine", 1);
shader_set_i("mat_metalic", 0); shader_set_i("mat_metalic", 0);
shader_set_f("mat_reflective", 0); shader_set_f("mat_reflective", 0);
} else }
_mat.submitShader();
vertex_submit(VB[i], render_type, _tex); vertex_submit(VB[i], render_type, _tex);
} else if(_shader == sh_d3d_geometry) { } else if(_shader == sh_d3d_geometry) {
if(!is_instanceof(_mat, __d3dMaterial)) if(_useMat)
shader_set_i("use_normal", 0);
else
_mat.submitGeometry(); _mat.submitGeometry();
else
shader_set_i("use_normal", 0);
vertex_submit(VB[i], render_type, _tex); vertex_submit(VB[i], render_type, _tex);
} else } else

View file

@ -0,0 +1,68 @@
function Node_Blur_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Shape Blur";
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 1] = nodeValue("Blur Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 2] = nodeValue("Blur mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 3] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 4] = nodeValue("Mix", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
.setDisplay(VALUE_DISPLAY.slider);
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
active_index = 5;
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
inputs[| 7] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_button, [ "Blur", "Max" ]);
__init_mask_modifier(3); // inputs 7, 8
input_display_list = [ 5, 6,
["Surfaces", true], 0, 3, 4, 7, 8,
["Blur", false], 7, 1, 2,
];
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
attribute_surface_depth();
attribute_oversample();
static step = function() { #region
__step_mask_modifier();
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
if(!is_surface(_data[0])) return _outSurf;
var _samp = struct_try_get(attributes, "oversample");
var _blur = _data[1];
var _mask = _data[2];
var _mode = _data[7];
surface_set_shader(_outSurf, sh_blur_shape);
shader_set_f("dimension", surface_get_dimension(_data[0]));
shader_set_f("blurMaskDimension", surface_get_dimension(_blur));
var b = shader_set_surface("blurMask", _blur);
shader_set_i("sampleMode", _samp);
shader_set_i("mode", _mode);
gpu_set_tex_filter_ext(b, true);
shader_set_i("useMask", is_surface(_mask));
shader_set_surface("mask", _mask);
draw_surface_safe(_data[0]);
surface_reset_shader();
__process_mask_modifier(_data);
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
return _outSurf;
} #endregion
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_blur_shape",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "blur",
"path": "folders/nodes/data/filter/blur.yy",
},
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_color_adjustment",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_color_replacement",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_glow",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_outline",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -129,6 +129,14 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
attribute_surface_depth(); attribute_surface_depth();
attributes.auto_refresh = true;
array_push(attributeEditors, ["Auto refresh", function() { return attributes.auto_refresh; },
new checkBox(function() {
attributes.auto_refresh = !attributes.auto_refresh;
triggerRender();
})]);
static refreshPalette = function() { #region static refreshPalette = function() { #region
var _surf = inputs[| 0].getValue(); var _surf = inputs[| 0].getValue();
@ -174,7 +182,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
static onValueFromUpdate = function(index) { #region static onValueFromUpdate = function(index) { #region
if(LOADING || APPENDING || CLONING) return; if(LOADING || APPENDING || CLONING) return;
if(index == 0) refreshPalette(); if(index == 0 && attributes.auto_refresh) refreshPalette();
} #endregion } #endregion
static step = function() { #region static step = function() { #region

View file

@ -18,8 +18,8 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _
.setDisplay(VALUE_DISPLAY.slider); .setDisplay(VALUE_DISPLAY.slider);
addShaderProp(SHADER_UNIFORM.float, "slope"); addShaderProp(SHADER_UNIFORM.float, "slope");
inputs[| 5] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) inputs[| 5] = nodeValue("Curve", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.slider); .setDisplay(VALUE_DISPLAY.slider_range, { range: [ 0, 4, 0.01 ] });
addShaderProp(SHADER_UNIFORM.float, "curve"); addShaderProp(SHADER_UNIFORM.float, "curve");
inputs[| 6] = nodeValue("Curve scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 ); inputs[| 6] = nodeValue("Curve scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1 );
@ -29,10 +29,21 @@ function Node_Noise_Strand(_x, _y, _group = noone) : Node_Shader_Generator(_x, _
.setDisplay(VALUE_DISPLAY.slider); .setDisplay(VALUE_DISPLAY.slider);
addShaderProp(SHADER_UNIFORM.float, "thickness"); addShaderProp(SHADER_UNIFORM.float, "thickness");
inputs[| 8] = nodeValue("Curve shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 );
addShaderProp(SHADER_UNIFORM.float, "curveShift");
inputs[| 9] = nodeValue("Axis", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_button, [ "x", "y" ] );
addShaderProp(SHADER_UNIFORM.integer, "axis");
inputs[| 10] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.enum_button, [ "line", "area" ] );
addShaderProp(SHADER_UNIFORM.integer, "mode");
input_display_list = [ 3, input_display_list = [ 3,
["Output", true], 0, ["Output", true], 0,
["Noise", false], 1, 2, 4, ["Noise", false], 9, 1, 2, 4,
["Curve", false], 5, 6, ["Curve", false], 5, 6, 8,
["Render", false], 7, ["Render", false], 10, 7,
]; ];
} }

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "process",
"path": "folders/nodes/data/process.yy",
},
"resourceVersion": "1.0",
"name": "node_outline",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -0,0 +1,36 @@
function Node_Project_Data(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
name = "Project Data";
w = 96;
outputs[| 0] = nodeValue("Name", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "")
.setVisible(false);
outputs[| 1] = nodeValue("Description", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "")
.setVisible(false);
outputs[| 2] = nodeValue("Author", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "")
.setVisible(false);
outputs[| 3] = nodeValue("Contact", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "")
.setVisible(false);
outputs[| 4] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "")
.setVisible(false);
static update = function() {
outputs[| 0].setValue(filename_name_only(PROJECT.path));
outputs[| 1].setValue(PROJECT.meta.description);
outputs[| 2].setValue(PROJECT.meta.author);
outputs[| 3].setValue(PROJECT.meta.contact);
outputs[| 4].setValue(PROJECT.path);
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
var bbox = drawGetBbox(xx, yy, _s);
var txt = outputs[| 0].getValue();
draw_set_text(f_p0, fa_center, fa_center, COLORS._main_text);
draw_text_bbox(bbox, txt);
}
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_project_data",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "misc",
"path": "folders/nodes/data/misc.yy",
},
}

View file

@ -502,6 +502,7 @@ function __initNodes() {
addNodeObject(filter, "Radial Blur", s_node_radial, "Node_Blur_Radial", [1, Node_Blur_Radial],, "Blur image by rotating aroung a mid point.").setVersion(1110); addNodeObject(filter, "Radial Blur", s_node_radial, "Node_Blur_Radial", [1, Node_Blur_Radial],, "Blur image by rotating aroung a mid point.").setVersion(1110);
addNodeObject(filter, "Lens Blur", s_node_bokeh, "Node_Blur_Bokeh", [1, Node_Blur_Bokeh], ["bokeh"], "Create bokeh effect. Blur lighter color in a lens-like manner.").setVersion(1110); addNodeObject(filter, "Lens Blur", s_node_bokeh, "Node_Blur_Bokeh", [1, Node_Blur_Bokeh], ["bokeh"], "Create bokeh effect. Blur lighter color in a lens-like manner.").setVersion(1110);
addNodeObject(filter, "Contrast Blur", s_node_blur_contrast, "Node_Blur_Contrast", [1, Node_Blur_Contrast],, "Blur only pixel of a similiar color."); addNodeObject(filter, "Contrast Blur", s_node_blur_contrast, "Node_Blur_Contrast", [1, Node_Blur_Contrast],, "Blur only pixel of a similiar color.");
addNodeObject(filter, "Shape Blur", s_node_shape_blur, "Node_Blur_Shape", [1, Node_Blur_Shape]).setVersion(11650);
addNodeObject(filter, "Average", s_node_average, "Node_Average", [1, Node_Average],, "Average color of every pixels in the image.").setVersion(1110); addNodeObject(filter, "Average", s_node_average, "Node_Average", [1, Node_Average],, "Average color of every pixels in the image.").setVersion(1110);
ds_list_add(filter, "Warps"); ds_list_add(filter, "Warps");
@ -920,6 +921,9 @@ function __initNodes() {
addNodeObject(node, "Graph Preview", s_node_image, "Node_Graph_Preview", [1, Node_Graph_Preview]); addNodeObject(node, "Graph Preview", s_node_image, "Node_Graph_Preview", [1, Node_Graph_Preview]);
//addNodeObject(node, "Module Test", s_node_print, "Node_Module_Test", [1, Node_Module_Test]); //addNodeObject(node, "Module Test", s_node_print, "Node_Module_Test", [1, Node_Module_Test]);
ds_list_add(node, "Project");
addNodeObject(node, "Project Data", s_node_project_data, "Node_Project_Data", [1, Node_Project_Data]).setVersion(11650);
ds_list_add(node, "System"); ds_list_add(node, "System");
addNodeObject(node, "Execute Shell", s_node_shell_excecute, "Node_Shell", [1, Node_Shell], ["terminal", "execute", "run"], "Execute shell script.").setVersion(11530); addNodeObject(node, "Execute Shell", s_node_shell_excecute, "Node_Shell", [1, Node_Shell], ["terminal", "execute", "run"], "Execute shell script.").setVersion(11530);
addNodeObject(node, "Monitor Capture", s_node_monitor_capture, "Node_Monitor_Capture", [1, Node_Monitor_Capture]); addNodeObject(node, "Monitor Capture", s_node_monitor_capture, "Node_Monitor_Capture", [1, Node_Monitor_Capture]);

View file

@ -63,7 +63,7 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
.setDisplay(VALUE_DISPLAY.text_array, { data: [ "Scale", "Rotation", "Color" ] }); .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Scale", "Rotation", "Color" ] });
inputs[| 18] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) inputs[| 18] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Add" ]); .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Normal", "Add", "Max" ]);
inputs[| 19] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone); inputs[| 19] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone);
@ -347,9 +347,9 @@ function Node_Scatter(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
if(mulpA) BLEND_ALPHA_MULP; if(mulpA) BLEND_ALPHA_MULP;
else BLEND_ALPHA; else BLEND_ALPHA;
break; break;
case 1 :
BLEND_ADD; case 1 : BLEND_ADD; break;
break; case 2 : gpu_set_blendmode(bm_max); break;
} }
var positions = array_create(_amount); var positions = array_create(_amount);

View file

@ -1,9 +1,9 @@
function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { function Node_String(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "Text"; name = "Text";
w = 96;
w = 96;
inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, ""); inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "");
outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "");
static processData = function(_output, _data, _index = 0) { static processData = function(_output, _data, _index = 0) {

View file

@ -0,0 +1,77 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform vec2 dimension;
uniform sampler2D blurMask;
uniform vec2 blurMaskDimension;
uniform int useMask;
uniform sampler2D mask;
uniform int sampleMode;
uniform int mode;
float sampleMask() { #region
if(useMask == 0) return 1.;
vec4 m = texture2D( mask, v_vTexcoord );
return (m.r + m.g + m.b) / 3. * m.a;
} #endregion
float sampleBlurMask(vec2 pos) { #region
vec4 m = texture2D( blurMask, 1. - pos );
return (m.r + m.g + m.b) / 3. * m.a;
} #endregion
vec4 sampleTexture(vec2 pos) { #region
if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.)
return texture2D(gm_BaseTexture, pos);
if(sampleMode == 0)
return vec4(0.);
if(sampleMode == 1)
return texture2D(gm_BaseTexture, clamp(pos, 0., 1.));
if(sampleMode == 2)
return texture2D(gm_BaseTexture, fract(pos));
return vec4(0.);
} #endregion
void main() {
gl_FragColor = sampleTexture( v_vTexcoord );
vec2 px = v_vTexcoord * dimension;
vec2 tx = 1. / dimension;
float msk = sampleMask();
if(msk == 0.) return;
float bs = 1. / msk;
vec4 col = vec4(0.);
float weight = 0.;
vec2 bdim2 = blurMaskDimension / 2.;
for(float i = 0.; i <= 64.; i++)
for(float j = 0.; j <= 64.; j++) {
if(i >= blurMaskDimension.x || j >= blurMaskDimension.y) continue;
vec2 bPx = (vec2(i, j) - bdim2) * bs;
if(abs(bPx.x / blurMaskDimension.x) >= .5 || abs(bPx.y / blurMaskDimension.y) >= .5) continue;
vec4 c = sampleTexture((px + bPx) * tx);
float b = sampleBlurMask(bPx / blurMaskDimension + 0.5);
if(mode == 0) {
col += c * b;
weight += b;
} else if(mode == 1) {
col = max(col, c * b);
}
}
if(mode == 0) col /= weight;
else if(mode == 1) col.a = 1.;
gl_FragColor = col;
}

View 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;
}

View file

@ -0,0 +1,10 @@
{
"resourceType": "GMShader",
"resourceVersion": "1.0",
"name": "sh_blur_shape",
"parent": {
"name": "blur",
"path": "folders/shader/filter/blur.yy",
},
"type": 1,
}

View file

@ -1,3 +1,5 @@
#define TAU 6.28318530718
varying vec2 v_vTexcoord; varying vec2 v_vTexcoord;
varying vec4 v_vColour; varying vec4 v_vColour;
@ -6,21 +8,27 @@ uniform vec2 position;
uniform float density; uniform float density;
uniform float seed; uniform float seed;
uniform float slope; uniform float slope;
uniform int axis;
uniform int mode;
uniform float curve; uniform vec2 curve;
uniform float curveDetail; uniform float curveDetail;
uniform float curveShift;
uniform float thickness; uniform float thickness;
float random (in vec2 st) { return fract(sin(dot(st.xy + vec2(1., 6.), vec2(2., 7.))) * (1. + seed)); } float random (in vec2 st) { return fract(sin(dot(st.xy + vec2(1., 6.), vec2(2., 7.))) * (1. + seed)); }
void main() { void main() {
vec2 tx = 1. / u_resolution; vec2 tx = 1. / u_resolution;
vec2 pos = v_vTexcoord + position; vec2 ps = v_vTexcoord + position;
float w = 0.; float w = 0.;
vec2 dim = axis == 0? u_resolution : u_resolution.yx;
vec2 pos = axis == 0? ps : ps.yx;
float _t = min(tx.x, tx.y) / 2.; float _t = min(tx.x, tx.y) / 2.;
float mt = 1. - _t; float mt = 1. - _t;
float rp = u_resolution.x; float rp = dim.x;
int amo = int(density * rp); int amo = int(density * rp);
for (int i = 0; i < amo; i++) { for (int i = 0; i < amo; i++) {
@ -30,12 +38,18 @@ void main() {
float _s = random(vec2(2., float(i))) - 0.5; float _s = random(vec2(2., float(i))) - 0.5;
float _a = random(vec2(float(i), 2.)); float _a = random(vec2(float(i), 2.));
float _c = mix(curve.x, curve.y, random(vec2(float(i), 3.)));
_x += _s * 2. * (pos.y - _y) * slope; _x += _s * 2. * (pos.y - _y) * slope;
_x += sin((pos.y - _y) * curveDetail * u_resolution.y / 4.) * curve / u_resolution.x * 2.; _x += sin((pos.y - _y) * curveDetail * dim.y / 4. + (curveShift * TAU/* * sign(_y - 0.5)*/)) * _c / dim.x * 2.;
float st = smoothstep(mt - thickness, mt + thickness, 1. - abs(pos.x - _x)) * _a; if(mode == 0) {
float st = smoothstep(mt - thickness, mt + thickness, 1. - abs(pos.x - _x)) * _a;
w = max(w, st); w = max(w, st);
} else if(mode == 1) {
float st = smoothstep(mt - thickness, mt + thickness, 1. - max(0., pos.x - _x)) * (1. / float(amo));
w += st;
}
} }
gl_FragColor = vec4(vec3(w), 1.); gl_FragColor = vec4(vec3(w), 1.);

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_project_data",
"bbox_bottom": 56,
"bbox_left": 2,
"bbox_right": 58,
"bbox_top": 7,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"a4f4ebb7-8a15-4be1-a442-27190c510382",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"ae431a05-2912-4eba-bce5-0d3e6f476784","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "misc",
"path": "folders/nodes/icons/misc.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_project_data",
"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":"a4f4ebb7-8a15-4be1-a442-27190c510382","path":"sprites/s_node_project_data/s_node_project_data.yy",},},},"Disabled":false,"id":"330437e7-8799-40d7-923b-fbbaf4722c26","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,
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_shape_blur",
"bbox_bottom": 56,
"bbox_left": 5,
"bbox_right": 57,
"bbox_top": 6,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"251b0713-d7c5-436f-8c01-7eced0c1485e",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"118334bf-c925-4973-80a9-4d975ea1fe62","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "blur",
"path": "folders/nodes/icons/filter/blur.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_shape_blur",
"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":"251b0713-d7c5-436f-8c01-7eced0c1485e","path":"sprites/s_node_shape_blur/s_node_shape_blur.yy",},},},"Disabled":false,"id":"6eec905d-013f-4797-9bd1-5d6360d8c366","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,
}