mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-02-13 13:50:29 +01:00
MK Blinker
This commit is contained in:
parent
19e230afba
commit
d67e9a208b
20 changed files with 376 additions and 80 deletions
|
@ -133,7 +133,7 @@
|
|||
{"name":"lua","order":12,"path":"folders/nodes/data/lua.yy",},
|
||||
{"name":"misc","order":10,"path":"folders/nodes/data/misc.yy",},
|
||||
{"name":"MK effects","order":24,"path":"folders/nodes/data/MK effects.yy",},
|
||||
{"name":"mk sparkle","order":8,"path":"folders/nodes/data/MK effects/mk sparkle.yy",},
|
||||
{"name":"mk sparkle","order":7,"path":"folders/nodes/data/MK effects/mk sparkle.yy",},
|
||||
{"name":"src","order":1,"path":"folders/nodes/data/MK effects/mk sparkle/src.yy",},
|
||||
{"name":"PCX","order":15,"path":"folders/nodes/data/PCX.yy",},
|
||||
{"name":"array","order":6,"path":"folders/nodes/data/PCX/array.yy",},
|
||||
|
@ -346,7 +346,7 @@
|
|||
{"name":"o_dialog_textbox_autocomplete","order":7,"path":"objects/o_dialog_textbox_autocomplete/o_dialog_textbox_autocomplete.yy",},
|
||||
{"name":"s_node_loop_input","order":14,"path":"sprites/s_node_loop_input/s_node_loop_input.yy",},
|
||||
{"name":"node_strand_length_adjust","order":11,"path":"scripts/node_strand_length_adjust/node_strand_length_adjust.yy",},
|
||||
{"name":"node_blinker","order":2,"path":"scripts/node_blinker/node_blinker.yy",},
|
||||
{"name":"node_mk_blinker","order":11,"path":"scripts/node_mk_blinker/node_mk_blinker.yy",},
|
||||
{"name":"s_node_3d_transform_scene","order":22,"path":"sprites/s_node_3d_transform_scene/s_node_3d_transform_scene.yy",},
|
||||
{"name":"fd_rectangle_add_material_surface","order":25,"path":"scripts/fd_rectangle_add_material_surface/fd_rectangle_add_material_surface.yy",},
|
||||
{"name":"perlin_noise","order":5,"path":"scripts/perlin_noise/perlin_noise.yy",},
|
||||
|
@ -1116,6 +1116,7 @@
|
|||
{"name":"s_node_draw_stack","order":4,"path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},
|
||||
{"name":"sh_d3d_grid_view","order":12,"path":"shaders/sh_d3d_grid_view/sh_d3d_grid_view.yy",},
|
||||
{"name":"delaunay","order":1,"path":"scripts/delaunay/delaunay.yy",},
|
||||
{"name":"s_node_mk_blinker","order":10,"path":"sprites/s_node_mk_blinker/s_node_mk_blinker.yy",},
|
||||
{"name":"sh_d3d_shadow_depth","order":19,"path":"shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.yy",},
|
||||
{"name":"s_node_smokeSim_repulse","order":1,"path":"sprites/s_node_smokeSim_repulse/s_node_smokeSim_repulse.yy",},
|
||||
{"name":"s_node_noise_fbm","order":26,"path":"sprites/s_node_noise_fbm/s_node_noise_fbm.yy",},
|
||||
|
@ -1199,7 +1200,7 @@
|
|||
{"name":"node_glow","order":10,"path":"scripts/node_glow/node_glow.yy",},
|
||||
{"name":"sh_blend_min","order":9,"path":"shaders/sh_blend_min/sh_blend_min.yy",},
|
||||
{"name":"d3d_gizmo_circle_z","order":4,"path":"scripts/d3d_gizmo_circle_z/d3d_gizmo_circle_z.yy",},
|
||||
{"name":"node_mk_flame","order":9,"path":"scripts/node_mk_flame/node_mk_flame.yy",},
|
||||
{"name":"node_mk_flame","order":8,"path":"scripts/node_mk_flame/node_mk_flame.yy",},
|
||||
{"name":"sh_d3d_background","order":21,"path":"shaders/sh_d3d_background/sh_d3d_background.yy",},
|
||||
{"name":"s_node_3d_scene","order":14,"path":"sprites/s_node_3d_scene/s_node_3d_scene.yy",},
|
||||
{"name":"sh_pb_shade_half","order":5,"path":"shaders/sh_pb_shade_half/sh_pb_shade_half.yy",},
|
||||
|
@ -1318,6 +1319,7 @@
|
|||
{"name":"sh_outline_only","order":35,"path":"shaders/sh_outline_only/sh_outline_only.yy",},
|
||||
{"name":"node_mk_saber","order":3,"path":"scripts/node_mk_saber/node_mk_saber.yy",},
|
||||
{"name":"lcd_function","order":13,"path":"scripts/lcd_function/lcd_function.yy",},
|
||||
{"name":"sh_draw_divide","order":12,"path":"shaders/sh_draw_divide/sh_draw_divide.yy",},
|
||||
{"name":"d3d_gizmo_line","order":1,"path":"scripts/d3d_gizmo_line/d3d_gizmo_line.yy",},
|
||||
{"name":"s_node_destray","order":18,"path":"sprites/s_node_destray/s_node_destray.yy",},
|
||||
{"name":"node_color_sampler","order":3,"path":"scripts/node_color_sampler/node_color_sampler.yy",},
|
||||
|
@ -1496,6 +1498,7 @@
|
|||
{"name":"panel_nodes","order":2,"path":"scripts/panel_nodes/panel_nodes.yy",},
|
||||
{"name":"sh_gradient_points","order":19,"path":"shaders/sh_gradient_points/sh_gradient_points.yy",},
|
||||
{"name":"node_array_composite","order":17,"path":"scripts/node_array_composite/node_array_composite.yy",},
|
||||
{"name":"sh_blink_expand","order":2,"path":"shaders/sh_blink_expand/sh_blink_expand.yy",},
|
||||
{"name":"s_node_vfx_turb","order":5,"path":"sprites/s_node_vfx_turb/s_node_vfx_turb.yy",},
|
||||
{"name":"o_dialog_l_system","order":1,"path":"objects/o_dialog_l_system/o_dialog_l_system.yy",},
|
||||
{"name":"node_surface_to_color","order":1,"path":"scripts/node_surface_to_color/node_surface_to_color.yy",},
|
||||
|
@ -1564,7 +1567,7 @@
|
|||
{"name":"node_path_map_area","order":1,"path":"scripts/node_path_map_area/node_path_map_area.yy",},
|
||||
{"name":"node_3d_mesh_icosphere","order":5,"path":"scripts/node_3d_mesh_icosphere/node_3d_mesh_icosphere.yy",},
|
||||
{"name":"s_node_timeline_preview","order":2,"path":"sprites/s_node_timeline_preview/s_node_timeline_preview.yy",},
|
||||
{"name":"node_mk_brownian","order":10,"path":"scripts/node_mk_brownian/node_mk_brownian.yy",},
|
||||
{"name":"node_mk_brownian","order":9,"path":"scripts/node_mk_brownian/node_mk_brownian.yy",},
|
||||
{"name":"s_node_3d_light_point","order":18,"path":"sprites/s_node_3d_light_point/s_node_3d_light_point.yy",},
|
||||
{"name":"libdlgmodule","order":13,"path":"extensions/libdlgmodule/libdlgmodule.yy",},
|
||||
{"name":"node_csv_file_read","order":8,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
|
||||
|
@ -1657,7 +1660,7 @@
|
|||
{"name":"panel_history","order":7,"path":"scripts/panel_history/panel_history.yy",},
|
||||
{"name":"sh_channel_H","order":3,"path":"shaders/sh_channel_H/sh_channel_H.yy",},
|
||||
{"name":"rotatorRandom","order":1,"path":"scripts/rotatorRandom/rotatorRandom.yy",},
|
||||
{"name":"node_mk_falls","order":11,"path":"scripts/node_mk_falls/node_mk_falls.yy",},
|
||||
{"name":"node_mk_falls","order":10,"path":"scripts/node_mk_falls/node_mk_falls.yy",},
|
||||
{"name":"node_spout_send","order":19,"path":"scripts/node_spout_send/node_spout_send.yy",},
|
||||
{"name":"s_node_RGB","order":34,"path":"sprites/s_node_RGB/s_node_RGB.yy",},
|
||||
{"name":"fd_rectangle_draw","order":9,"path":"scripts/fd_rectangle_draw/fd_rectangle_draw.yy",},
|
||||
|
@ -1774,6 +1777,7 @@
|
|||
{"name":"s_node_group_input","order":16,"path":"sprites/s_node_group_input/s_node_group_input.yy",},
|
||||
{"name":"sample_projects","order":6,"path":"scripts/sample_projects/sample_projects.yy",},
|
||||
{"name":"__matrix3","order":5,"path":"scripts/__matrix3/__matrix3.yy",},
|
||||
{"name":"sh_blink_replace","order":1,"path":"shaders/sh_blink_replace/sh_blink_replace.yy",},
|
||||
{"name":"draw_fit","order":12,"path":"scripts/draw_fit/draw_fit.yy",},
|
||||
{"name":"node_armature_sample","order":5,"path":"scripts/node_armature_sample/node_armature_sample.yy",},
|
||||
{"name":"__3d_particle","order":1,"path":"scripts/__3d_particle/__3d_particle.yy",},
|
||||
|
|
|
@ -548,7 +548,7 @@
|
|||
{"id":{"name":"o_dialog_textbox_autocomplete","path":"objects/o_dialog_textbox_autocomplete/o_dialog_textbox_autocomplete.yy",},},
|
||||
{"id":{"name":"s_node_loop_input","path":"sprites/s_node_loop_input/s_node_loop_input.yy",},},
|
||||
{"id":{"name":"node_strand_length_adjust","path":"scripts/node_strand_length_adjust/node_strand_length_adjust.yy",},},
|
||||
{"id":{"name":"node_blinker","path":"scripts/node_blinker/node_blinker.yy",},},
|
||||
{"id":{"name":"node_mk_blinker","path":"scripts/node_mk_blinker/node_mk_blinker.yy",},},
|
||||
{"id":{"name":"s_node_3d_transform_scene","path":"sprites/s_node_3d_transform_scene/s_node_3d_transform_scene.yy",},},
|
||||
{"id":{"name":"fd_rectangle_add_material_surface","path":"scripts/fd_rectangle_add_material_surface/fd_rectangle_add_material_surface.yy",},},
|
||||
{"id":{"name":"perlin_noise","path":"scripts/perlin_noise/perlin_noise.yy",},},
|
||||
|
@ -1421,6 +1421,7 @@
|
|||
{"id":{"name":"s_node_draw_stack","path":"sprites/s_node_draw_stack/s_node_draw_stack.yy",},},
|
||||
{"id":{"name":"sh_d3d_grid_view","path":"shaders/sh_d3d_grid_view/sh_d3d_grid_view.yy",},},
|
||||
{"id":{"name":"delaunay","path":"scripts/delaunay/delaunay.yy",},},
|
||||
{"id":{"name":"s_node_mk_blinker","path":"sprites/s_node_mk_blinker/s_node_mk_blinker.yy",},},
|
||||
{"id":{"name":"sh_d3d_shadow_depth","path":"shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.yy",},},
|
||||
{"id":{"name":"s_node_smokeSim_repulse","path":"sprites/s_node_smokeSim_repulse/s_node_smokeSim_repulse.yy",},},
|
||||
{"id":{"name":"s_node_noise_fbm","path":"sprites/s_node_noise_fbm/s_node_noise_fbm.yy",},},
|
||||
|
@ -1649,6 +1650,7 @@
|
|||
{"id":{"name":"sh_outline_only","path":"shaders/sh_outline_only/sh_outline_only.yy",},},
|
||||
{"id":{"name":"node_mk_saber","path":"scripts/node_mk_saber/node_mk_saber.yy",},},
|
||||
{"id":{"name":"lcd_function","path":"scripts/lcd_function/lcd_function.yy",},},
|
||||
{"id":{"name":"sh_draw_divide","path":"shaders/sh_draw_divide/sh_draw_divide.yy",},},
|
||||
{"id":{"name":"d3d_gizmo_line","path":"scripts/d3d_gizmo_line/d3d_gizmo_line.yy",},},
|
||||
{"id":{"name":"s_node_destray","path":"sprites/s_node_destray/s_node_destray.yy",},},
|
||||
{"id":{"name":"node_color_sampler","path":"scripts/node_color_sampler/node_color_sampler.yy",},},
|
||||
|
@ -1859,6 +1861,7 @@
|
|||
{"id":{"name":"panel_nodes","path":"scripts/panel_nodes/panel_nodes.yy",},},
|
||||
{"id":{"name":"sh_gradient_points","path":"shaders/sh_gradient_points/sh_gradient_points.yy",},},
|
||||
{"id":{"name":"node_array_composite","path":"scripts/node_array_composite/node_array_composite.yy",},},
|
||||
{"id":{"name":"sh_blink_expand","path":"shaders/sh_blink_expand/sh_blink_expand.yy",},},
|
||||
{"id":{"name":"s_node_vfx_turb","path":"sprites/s_node_vfx_turb/s_node_vfx_turb.yy",},},
|
||||
{"id":{"name":"o_dialog_l_system","path":"objects/o_dialog_l_system/o_dialog_l_system.yy",},},
|
||||
{"id":{"name":"GmlLua","path":"scripts/GmlLua/GmlLua.yy",},},
|
||||
|
@ -2181,6 +2184,7 @@
|
|||
{"id":{"name":"sample_projects","path":"scripts/sample_projects/sample_projects.yy",},},
|
||||
{"id":{"name":"load_function","path":"scripts/load_function/load_function.yy",},},
|
||||
{"id":{"name":"__matrix3","path":"scripts/__matrix3/__matrix3.yy",},},
|
||||
{"id":{"name":"sh_blink_replace","path":"shaders/sh_blink_replace/sh_blink_replace.yy",},},
|
||||
{"id":{"name":"draw_fit","path":"scripts/draw_fit/draw_fit.yy",},},
|
||||
{"id":{"name":"node_armature_sample","path":"scripts/node_armature_sample/node_armature_sample.yy",},},
|
||||
{"id":{"name":"__3d_particle","path":"scripts/__3d_particle/__3d_particle.yy",},},
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
function Node_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "Blinker";
|
||||
|
||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range( 100000, 999999 ))
|
||||
|
||||
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 4] = nodeValue("Target Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
|
||||
.setDisplay(VALUE_DISPLAY.palette);
|
||||
|
||||
inputs[| 5] = nodeValue("Light Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
|
||||
.setDisplay(VALUE_DISPLAY.palette);
|
||||
|
||||
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 6;
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
input_display_list = [ 6,
|
||||
["Surfaces", false], 0, 1,
|
||||
["Blink", false], 2, 3, 4, 5,
|
||||
]
|
||||
|
||||
temp_surface = [ surface_create( 1, 1 ) ];
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||
//var _surf = _data[0];
|
||||
//var _mask = _data[1];
|
||||
//var _seed = _data[2];
|
||||
//var _amou = _data[3];
|
||||
//var _trgC = _data[4];
|
||||
//var _ligC = _data[5];
|
||||
|
||||
//if(!is_surface(_surf)) return _outSurf;
|
||||
|
||||
//temp_surface[0] = surface_verify(temp_surface[0], surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf));
|
||||
|
||||
//surface_set_shader(temp_surface[0], sh_blink_extract);
|
||||
// draw_surface_safe(_surf);
|
||||
//surface_reset_shader();
|
||||
|
||||
//surface_set_shader(_outSurf, sh_blink_replace);
|
||||
// draw_surface_safe(temp_surface[0]);
|
||||
//surface_reset_shader();
|
||||
|
||||
//return _outSurf;
|
||||
}
|
||||
}
|
95
scripts/node_mk_blinker/node_mk_blinker.gml
Normal file
95
scripts/node_mk_blinker/node_mk_blinker.gml
Normal file
|
@ -0,0 +1,95 @@
|
|||
function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "MK Blinker";
|
||||
|
||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random())
|
||||
|
||||
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 4] = nodeValue("Target Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, [ c_black ] )
|
||||
.setDisplay(VALUE_DISPLAY.palette);
|
||||
|
||||
inputs[| 5] = nodeValue("Light Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, [ c_white ] )
|
||||
.setDisplay(VALUE_DISPLAY.palette);
|
||||
|
||||
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 6;
|
||||
|
||||
inputs[| 7] = nodeValue("Tolerance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1 )
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ new Inspector_Sprite(s_MKFX), 6,
|
||||
["Surfaces", false], 0, 1,
|
||||
["Blink", false], 2, 3, 4, 5, 7,
|
||||
]
|
||||
|
||||
temp_surface = [ surface_create( 1, 1 ), surface_create( 1, 1 ), surface_create( 1, 1 ) ];
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||
var _surf = _data[0];
|
||||
var _mask = _data[1];
|
||||
var _seed = _data[2];
|
||||
var _amou = _data[3];
|
||||
var _trgC = _data[4];
|
||||
var _ligC = _data[5];
|
||||
var _tolr = _data[7];
|
||||
|
||||
if(!is_surface(_surf)) return _outSurf;
|
||||
|
||||
var _sw = surface_get_width_safe(_outSurf);
|
||||
var _sh = surface_get_height_safe(_outSurf);
|
||||
|
||||
for( var i = 0, n = array_length(temp_surface); i < n; i++ )
|
||||
temp_surface[i] = surface_verify(temp_surface[i], _sw, _sh);
|
||||
|
||||
surface_set_shader(temp_surface[0], sh_blink_extract);
|
||||
shader_set_palette(_trgC, "colorTarget", "colorTargetAmount");
|
||||
shader_set_f("tolerance", _tolr);
|
||||
|
||||
draw_surface_safe(_surf);
|
||||
surface_reset_shader();
|
||||
|
||||
var rp = sqrt(_sw * _sw + _sh * _sh);
|
||||
var ind = 0;
|
||||
var _umask = is_surface(_mask);
|
||||
|
||||
repeat(rp) {
|
||||
surface_set_shader(temp_surface[!ind], sh_blink_expand);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_i("useMask", _umask);
|
||||
shader_set_surface("mask", _mask);
|
||||
|
||||
draw_surface(temp_surface[ind], 0, 0);
|
||||
surface_reset_shader();
|
||||
|
||||
ind = !ind;
|
||||
}
|
||||
|
||||
surface_set_shader(temp_surface[2], sh_blink_replace);
|
||||
shader_set_f("seed", _seed);
|
||||
shader_set_f("ratio", _amou);
|
||||
shader_set_palette(_ligC);
|
||||
|
||||
draw_surface_safe(temp_surface[ind]);
|
||||
surface_reset_shader();
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
DRAW_CLEAR
|
||||
BLEND_OVERRIDE
|
||||
|
||||
draw_surface(_surf, 0, 0);
|
||||
BLEND_ALPHA_MULP
|
||||
|
||||
draw_surface(temp_surface[2], 0, 0);
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_blinker",
|
||||
"name": "node_mk_blinker",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "regions",
|
||||
"path": "folders/nodes/data/generator/regions.yy",
|
||||
"name": "MK effects",
|
||||
"path": "folders/nodes/data/MK effects.yy",
|
||||
},
|
||||
}
|
|
@ -99,8 +99,9 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
var _vx = 0;
|
||||
var _vy = 1;
|
||||
|
||||
var _p0;
|
||||
var _p0 = [ 0, 0 ];
|
||||
var _p1 = [ _px, _py ];
|
||||
var _frc = 1;
|
||||
|
||||
for(var i = -2; i < t; i++) {
|
||||
var _i = i / TOTAL_FRAMES * pi * 4;
|
||||
|
@ -108,15 +109,18 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
_vx = sin(_sw * _sp * _i) * _sg * _sx * (1 + i / TOTAL_FRAMES * _nx);
|
||||
_vy += sin(_sw / _sp * _i * 2) * _sy;
|
||||
|
||||
if(_py <= _gr || i < 0) {
|
||||
_p0 = [ _p1[0], _p1[1] ];
|
||||
_p1 = [ _px, _py ];
|
||||
if(_frc >= 0.2) {
|
||||
_p0[0] = _p1[0];
|
||||
_p1[0] = _px;
|
||||
_px += (_vx + _wind[0]) * _sp * _frc;
|
||||
}
|
||||
|
||||
if(_py <= _gr) {
|
||||
_px += (_vx + _wind[0]) * _sp;
|
||||
_py += (_vy + _wind[1]) * _sp;
|
||||
}
|
||||
_p0[1] = _p1[1];
|
||||
_p1[1] = _py;
|
||||
_py += (_vy + _wind[1]) * _sp * _frc;
|
||||
|
||||
if(_py > _gr)
|
||||
_frc *= 0.5;
|
||||
|
||||
_vy += _gravity * _sp;
|
||||
}
|
||||
|
@ -155,8 +159,9 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
BLEND_OVERRIDE
|
||||
draw_surface_safe(_surf);
|
||||
BLEND_ALPHA_MULP
|
||||
BLEND_NORMAL
|
||||
|
||||
shader_set(sh_draw_divide);
|
||||
for( var i = 0; i < _amou; i++ ) {
|
||||
_sed += 100;
|
||||
|
||||
|
@ -198,6 +203,7 @@ function Node_MK_Fall(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
draw_set_alpha(1);
|
||||
}
|
||||
shader_reset();
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
} #endregion
|
||||
|
|
|
@ -675,6 +675,7 @@ function __initNodes() {
|
|||
addNodeObject(generator, "MK Flag", s_node_mk_flag, "Node_MK_Flag", [1, Node_MK_Flag]).setVersion(11600);
|
||||
addNodeObject(generator, "MK Brownian", s_node_mk_brownian, "Node_MK_Brownian", [1, Node_MK_Brownian]).setVersion(11630);
|
||||
addNodeObject(generator, "MK Fall", s_node_mk_fall, "Node_MK_Fall", [1, Node_MK_Fall], ["Leaf"]).setVersion(11630);
|
||||
addNodeObject(generator, "MK Blinker", s_node_mk_blinker, "Node_MK_Blinker", [1, Node_MK_Blinker]).setVersion(11630);
|
||||
//addNodeObject(generator, "MK Sparkle", s_node_mk_sparkle, "Node_MK_Sparkle", [1, Node_MK_Sparkle]).patreonExtra();
|
||||
#endregion
|
||||
|
||||
|
|
51
shaders/sh_blink_expand/sh_blink_expand.fsh
Normal file
51
shaders/sh_blink_expand/sh_blink_expand.fsh
Normal file
|
@ -0,0 +1,51 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
|
||||
uniform int useMask;
|
||||
uniform sampler2D mask;
|
||||
|
||||
vec2 tx;
|
||||
|
||||
vec4 sample(float x, float y, vec4 c4) {
|
||||
vec4 c = texture2D( gm_BaseTexture, v_vTexcoord + vec2(x, y) * tx );
|
||||
|
||||
if(c.a > 0.) {
|
||||
c4.rgb = min(c4.rgb, c.rgb);
|
||||
|
||||
if(useMask == 1) {
|
||||
vec4 m = texture2D( mask, v_vTexcoord + vec2(x, y) * tx );
|
||||
if(m.r == 0.) c4.b = 0.;
|
||||
}
|
||||
}
|
||||
|
||||
return c4;
|
||||
}
|
||||
|
||||
void main() {
|
||||
tx = 1. / dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
vec4 c4 = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
if(c4.a == 0.) return;
|
||||
|
||||
if(useMask == 1) {
|
||||
vec4 m = texture2D( mask, v_vTexcoord );
|
||||
if(m.r == 0.) c4.b = 0.;
|
||||
}
|
||||
|
||||
c4 = sample(-1., -1., c4);
|
||||
c4 = sample(-1., 0., c4);
|
||||
c4 = sample(-1., 1., c4);
|
||||
|
||||
c4 = sample( 0., -1., c4);
|
||||
c4 = sample( 0., 1., c4);
|
||||
|
||||
c4 = sample( 1., -1., c4);
|
||||
c4 = sample( 1., 0., c4);
|
||||
c4 = sample( 1., 1., c4);
|
||||
|
||||
gl_FragColor = c4;
|
||||
|
||||
}
|
19
shaders/sh_blink_expand/sh_blink_expand.vsh
Normal file
19
shaders/sh_blink_expand/sh_blink_expand.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_blink_expand/sh_blink_expand.yy
Normal file
10
shaders/sh_blink_expand/sh_blink_expand.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_blink_expand",
|
||||
"parent": {
|
||||
"name": "blinker",
|
||||
"path": "folders/shader/generator/blinker.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform float tolerance;
|
||||
uniform int useMask;
|
||||
uniform sampler2D mask;
|
||||
|
||||
uniform vec4 colorTarget[32];
|
||||
#define PALETTE_LIMIT 128
|
||||
|
||||
uniform vec4 colorTarget[PALETTE_LIMIT];
|
||||
uniform int colorTargetAmount;
|
||||
|
||||
void main() {
|
||||
|
@ -26,7 +26,7 @@ void main() {
|
|||
minDist = min(minDist, dist);
|
||||
}
|
||||
|
||||
if(minDist > 0.001) return;
|
||||
if(minDist > tolerance) return;
|
||||
|
||||
gl_FragColor = vec4(1.);
|
||||
gl_FragColor = vec4(v_vTexcoord, 1., 1.);
|
||||
}
|
||||
|
|
25
shaders/sh_blink_replace/sh_blink_replace.fsh
Normal file
25
shaders/sh_blink_replace/sh_blink_replace.fsh
Normal file
|
@ -0,0 +1,25 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform float seed;
|
||||
uniform float ratio;
|
||||
|
||||
#define PALETTE_LIMIT 128
|
||||
|
||||
uniform int usePalette;
|
||||
uniform vec4 palette[PALETTE_LIMIT];
|
||||
uniform int paletteAmount;
|
||||
|
||||
float random (in vec2 st) { return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * (43758.5453123 + seed)); }
|
||||
|
||||
void main() {
|
||||
vec4 pos = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
gl_FragColor = vec4(0.);
|
||||
if(pos.z == 0. || pos.a == 0.) return;
|
||||
|
||||
int index = int(floor(random(pos.rg) * float(paletteAmount)));
|
||||
float rrat = random(pos.rg + vec2(1.6193, 3.5341));
|
||||
if(rrat >= ratio) return;
|
||||
|
||||
gl_FragColor = palette[index];
|
||||
}
|
19
shaders/sh_blink_replace/sh_blink_replace.vsh
Normal file
19
shaders/sh_blink_replace/sh_blink_replace.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_blink_replace/sh_blink_replace.yy
Normal file
10
shaders/sh_blink_replace/sh_blink_replace.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_blink_replace",
|
||||
"parent": {
|
||||
"name": "blinker",
|
||||
"path": "folders/shader/generator/blinker.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
6
shaders/sh_draw_divide/sh_draw_divide.fsh
Normal file
6
shaders/sh_draw_divide/sh_draw_divide.fsh
Normal file
|
@ -0,0 +1,6 @@
|
|||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
gl_FragColor = v_vColour;
|
||||
gl_FragColor.rgb /= gl_FragColor.a;
|
||||
}
|
15
shaders/sh_draw_divide/sh_draw_divide.vsh
Normal file
15
shaders/sh_draw_divide/sh_draw_divide.vsh
Normal file
|
@ -0,0 +1,15 @@
|
|||
//
|
||||
// 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)
|
||||
|
||||
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;
|
||||
}
|
10
shaders/sh_draw_divide/sh_draw_divide.yy
Normal file
10
shaders/sh_draw_divide/sh_draw_divide.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_draw_divide",
|
||||
"parent": {
|
||||
"name": "draw",
|
||||
"path": "folders/shader/draw.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
74
sprites/s_node_mk_blinker/s_node_mk_blinker.yy
Normal file
74
sprites/s_node_mk_blinker/s_node_mk_blinker.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_mk_blinker",
|
||||
"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":"e2da167e-15a4-49d9-a617-f6e9f3977c95",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"a78a3711-0e3c-41aa-b3eb-b43e7a1f8a95","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "MK effects",
|
||||
"path": "folders/nodes/icons/MK effects.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_mk_blinker",
|
||||
"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":"e2da167e-15a4-49d9-a617-f6e9f3977c95","path":"sprites/s_node_mk_blinker/s_node_mk_blinker.yy",},},},"Disabled":false,"id":"35a8e982-60e5-48cd-815a-752025ca6f36","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,
|
||||
}
|
Loading…
Reference in a new issue