mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 06:04:49 +01:00
mk subpixel
This commit is contained in:
parent
6d999c68eb
commit
5625b70ba2
78 changed files with 1672 additions and 218 deletions
|
@ -81,8 +81,8 @@
|
|||
{"name":"misc","order":22,"path":"folders/nodes/data/misc.yy",},
|
||||
{"name":"lovify","order":24,"path":"folders/nodes/data/misc/lovify.yy",},
|
||||
{"name":"tunnel","order":25,"path":"folders/nodes/data/misc/tunnel.yy",},
|
||||
{"name":"MK_effects","order":23,"path":"folders/nodes/data/MK_effects.yy",},
|
||||
{"name":"src","order":14,"path":"folders/nodes/data/MK_effects/src.yy",},
|
||||
{"name":"MKFX","order":23,"path":"folders/nodes/data/MKFX.yy",},
|
||||
{"name":"src","order":14,"path":"folders/nodes/data/MKFX/src.yy",},
|
||||
{"name":"PCX","order":24,"path":"folders/nodes/data/PCX.yy",},
|
||||
{"name":"array","order":3,"path":"folders/nodes/data/PCX/array.yy",},
|
||||
{"name":"flow_control","order":4,"path":"folders/nodes/data/PCX/flow_control.yy",},
|
||||
|
@ -196,6 +196,7 @@
|
|||
{"name":"MK effects","order":12,"path":"folders/shader/MK effects.yy",},
|
||||
{"name":"Flag","order":3,"path":"folders/shader/MK effects/Flag.yy",},
|
||||
{"name":"Fracture","order":5,"path":"folders/shader/MK effects/Fracture.yy",},
|
||||
{"name":"Subpixel","order":6,"path":"folders/shader/MK effects/Subpixel.yy",},
|
||||
{"name":"Tile","order":4,"path":"folders/shader/MK effects/Tile.yy",},
|
||||
{"name":"noise","order":19,"path":"folders/shader/noise.yy",},
|
||||
{"name":"pixel_builder","order":13,"path":"folders/shader/pixel_builder.yy",},
|
||||
|
@ -711,6 +712,7 @@
|
|||
{"name":"node_alpha_cutoff","order":10,"path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",},
|
||||
{"name":"node_alpha_grey","order":3,"path":"scripts/node_alpha_grey/node_alpha_grey.yy",},
|
||||
{"name":"node_alpha_hash","order":11,"path":"scripts/node_alpha_hash/node_alpha_hash.yy",},
|
||||
{"name":"node_ambient_occlusion","order":4,"path":"scripts/node_ambient_occlusion/node_ambient_occlusion.yy",},
|
||||
{"name":"node_anim_priority","order":2,"path":"scripts/node_anim_priority/node_anim_priority.yy",},
|
||||
{"name":"node_animation_control","order":9,"path":"scripts/node_animation_control/node_animation_control.yy",},
|
||||
{"name":"node_application_in","order":18,"path":"scripts/node_application_in/node_application_in.yy",},
|
||||
|
@ -939,6 +941,7 @@
|
|||
{"name":"node_mk_rain","order":1,"path":"scripts/node_mk_rain/node_mk_rain.yy",},
|
||||
{"name":"node_mk_saber","order":3,"path":"scripts/node_mk_saber/node_mk_saber.yy",},
|
||||
{"name":"node_mk_sparkle","order":13,"path":"scripts/node_mk_sparkle/node_mk_sparkle.yy",},
|
||||
{"name":"node_mk_subpixel","order":16,"path":"scripts/node_mk_subpixel/node_mk_subpixel.yy",},
|
||||
{"name":"node_mk_tile","order":6,"path":"scripts/node_mk_tile/node_mk_tile.yy",},
|
||||
{"name":"node_module_test","order":2,"path":"scripts/node_module_test/node_module_test.yy",},
|
||||
{"name":"node_monitor_capture","order":19,"path":"scripts/node_monitor_capture/node_monitor_capture.yy",},
|
||||
|
@ -1577,6 +1580,13 @@
|
|||
{"name":"sh_mk_flag_shade","order":1,"path":"shaders/sh_mk_flag_shade/sh_mk_flag_shade.yy",},
|
||||
{"name":"sh_mk_flipGrid","order":1,"path":"shaders/sh_mk_flipGrid/sh_mk_flipGrid.yy",},
|
||||
{"name":"sh_mk_saber_glow","order":2,"path":"shaders/sh_mk_saber_glow/sh_mk_saber_glow.yy",},
|
||||
{"name":"sh_mk_subpixel_chevron","order":4,"path":"shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.yy",},
|
||||
{"name":"sh_mk_subpixel_diagonal","order":7,"path":"shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.yy",},
|
||||
{"name":"sh_mk_subpixel_linear_block_offset","order":3,"path":"shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.yy",},
|
||||
{"name":"sh_mk_subpixel_linear_block","order":2,"path":"shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.yy",},
|
||||
{"name":"sh_mk_subpixel_linear","order":1,"path":"shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.yy",},
|
||||
{"name":"sh_mk_subpixel_square_non","order":6,"path":"shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.yy",},
|
||||
{"name":"sh_mk_subpixel_square","order":5,"path":"shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.yy",},
|
||||
{"name":"sh_mk_tile18_edge_l","order":1,"path":"shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy",},
|
||||
{"name":"sh_mk_tile18_edge_r","order":2,"path":"shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy",},
|
||||
{"name":"sh_mk_tile18_edge_t","order":3,"path":"shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.yy",},
|
||||
|
@ -1651,6 +1661,7 @@
|
|||
{"name":"sh_region_fill_inner","order":3,"path":"shaders/sh_region_fill_inner/sh_region_fill_inner.yy",},
|
||||
{"name":"sh_region_fill_map","order":4,"path":"shaders/sh_region_fill_map/sh_region_fill_map.yy",},
|
||||
{"name":"sh_region_fill_rg_coord","order":11,"path":"shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.yy",},
|
||||
{"name":"sh_region_fill_rg_index","order":12,"path":"shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.yy",},
|
||||
{"name":"sh_region_fill_rg_map","order":7,"path":"shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.yy",},
|
||||
{"name":"sh_remove_black","order":17,"path":"shaders/sh_remove_black/sh_remove_black.yy",},
|
||||
{"name":"sh_replace_color","order":4,"path":"shaders/sh_replace_color/sh_replace_color.yy",},
|
||||
|
@ -1660,6 +1671,7 @@
|
|||
{"name":"sh_rsh_erode","order":2,"path":"shaders/sh_rsh_erode/sh_rsh_erode.yy",},
|
||||
{"name":"sh_rsh_rotate","order":1,"path":"shaders/sh_rsh_rotate/sh_rsh_rotate.yy",},
|
||||
{"name":"sh_sample_points","order":9,"path":"shaders/sh_sample_points/sh_sample_points.yy",},
|
||||
{"name":"sh_sao","order":4,"path":"shaders/sh_sao/sh_sao.yy",},
|
||||
{"name":"sh_scale_cleanedge","order":57,"path":"shaders/sh_scale_cleanedge/sh_scale_cleanedge.yy",},
|
||||
{"name":"sh_scale2x","order":13,"path":"shaders/sh_scale2x/sh_scale2x.yy",},
|
||||
{"name":"sh_scale3x","order":15,"path":"shaders/sh_scale3x/sh_scale3x.yy",},
|
||||
|
@ -2018,6 +2030,7 @@
|
|||
{"name":"s_node_alpha_cut","order":1,"path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},
|
||||
{"name":"s_node_alpha_grey","order":2,"path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",},
|
||||
{"name":"s_node_animation_control","order":31,"path":"sprites/s_node_animation_control/s_node_animation_control.yy",},
|
||||
{"name":"s_node_AO","order":34,"path":"sprites/s_node_AO/s_node_AO.yy",},
|
||||
{"name":"s_node_argument","order":40,"path":"sprites/s_node_argument/s_node_argument.yy",},
|
||||
{"name":"s_node_armature_bind","order":14,"path":"sprites/s_node_armature_bind/s_node_armature_bind.yy",},
|
||||
{"name":"s_node_armature_create","order":16,"path":"sprites/s_node_armature_create/s_node_armature_create.yy",},
|
||||
|
@ -2261,6 +2274,7 @@
|
|||
{"name":"s_node_mk_rain","order":4,"path":"sprites/s_node_mk_rain/s_node_mk_rain.yy",},
|
||||
{"name":"s_node_mk_saber","order":1,"path":"sprites/s_node_mk_saber/s_node_mk_saber.yy",},
|
||||
{"name":"s_node_mk_sparkle","order":7,"path":"sprites/s_node_mk_sparkle/s_node_mk_sparkle.yy",},
|
||||
{"name":"s_node_mk_subpixel","order":14,"path":"sprites/s_node_mk_subpixel/s_node_mk_subpixel.yy",},
|
||||
{"name":"s_node_monitor_capture","order":38,"path":"sprites/s_node_monitor_capture/s_node_monitor_capture.yy",},
|
||||
{"name":"s_node_morph_surface","order":35,"path":"sprites/s_node_morph_surface/s_node_morph_surface.yy",},
|
||||
{"name":"s_node_move","order":136,"path":"sprites/s_node_move/s_node_move.yy",},
|
||||
|
|
|
@ -175,8 +175,8 @@
|
|||
{"$GMFolder":"","%Name":"lovify","folderPath":"folders/nodes/data/misc/lovify.yy","name":"lovify","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"spr","folderPath":"folders/nodes/data/misc/lovify/spr.yy","name":"spr","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"tunnel","folderPath":"folders/nodes/data/misc/tunnel.yy","name":"tunnel","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"MK_effects","folderPath":"folders/nodes/data/MK_effects.yy","name":"MK_effects","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"src","folderPath":"folders/nodes/data/MK_effects/src.yy","name":"src","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"MKFX","folderPath":"folders/nodes/data/MKFX.yy","name":"MKFX","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"src","folderPath":"folders/nodes/data/MKFX/src.yy","name":"src","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"PCX","folderPath":"folders/nodes/data/PCX.yy","name":"PCX","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"array","folderPath":"folders/nodes/data/PCX/array.yy","name":"array","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"flow_control","folderPath":"folders/nodes/data/PCX/flow_control.yy","name":"flow_control","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
|
@ -307,6 +307,7 @@
|
|||
{"$GMFolder":"","%Name":"MK effects","folderPath":"folders/shader/MK effects.yy","name":"MK effects","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"Flag","folderPath":"folders/shader/MK effects/Flag.yy","name":"Flag","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"Fracture","folderPath":"folders/shader/MK effects/Fracture.yy","name":"Fracture","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"Subpixel","folderPath":"folders/shader/MK effects/Subpixel.yy","name":"Subpixel","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"Tile","folderPath":"folders/shader/MK effects/Tile.yy","name":"Tile","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"noise","folderPath":"folders/shader/noise.yy","name":"noise","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
{"$GMFolder":"","%Name":"pixel_builder","folderPath":"folders/shader/pixel_builder.yy","name":"pixel_builder","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||
|
@ -1254,6 +1255,7 @@
|
|||
{"id":{"name":"node_alpha_cutoff","path":"scripts/node_alpha_cutoff/node_alpha_cutoff.yy",},},
|
||||
{"id":{"name":"node_alpha_grey","path":"scripts/node_alpha_grey/node_alpha_grey.yy",},},
|
||||
{"id":{"name":"node_alpha_hash","path":"scripts/node_alpha_hash/node_alpha_hash.yy",},},
|
||||
{"id":{"name":"node_ambient_occlusion","path":"scripts/node_ambient_occlusion/node_ambient_occlusion.yy",},},
|
||||
{"id":{"name":"node_anim_curve","path":"scripts/node_anim_curve/node_anim_curve.yy",},},
|
||||
{"id":{"name":"node_anim_priority","path":"scripts/node_anim_priority/node_anim_priority.yy",},},
|
||||
{"id":{"name":"node_animation_control","path":"scripts/node_animation_control/node_animation_control.yy",},},
|
||||
|
@ -1517,6 +1519,7 @@
|
|||
{"id":{"name":"node_mk_rain","path":"scripts/node_mk_rain/node_mk_rain.yy",},},
|
||||
{"id":{"name":"node_mk_saber","path":"scripts/node_mk_saber/node_mk_saber.yy",},},
|
||||
{"id":{"name":"node_mk_sparkle","path":"scripts/node_mk_sparkle/node_mk_sparkle.yy",},},
|
||||
{"id":{"name":"node_mk_subpixel","path":"scripts/node_mk_subpixel/node_mk_subpixel.yy",},},
|
||||
{"id":{"name":"node_mk_tile","path":"scripts/node_mk_tile/node_mk_tile.yy",},},
|
||||
{"id":{"name":"node_module_test","path":"scripts/node_module_test/node_module_test.yy",},},
|
||||
{"id":{"name":"node_monitor_capture","path":"scripts/node_monitor_capture/node_monitor_capture.yy",},},
|
||||
|
@ -2253,6 +2256,14 @@
|
|||
{"id":{"name":"sh_mk_flipGrid","path":"shaders/sh_mk_flipGrid/sh_mk_flipGrid.yy",},},
|
||||
{"id":{"name":"sh_mk_fracture","path":"shaders/sh_mk_fracture/sh_mk_fracture.yy",},},
|
||||
{"id":{"name":"sh_mk_saber_glow","path":"shaders/sh_mk_saber_glow/sh_mk_saber_glow.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_chevron","path":"shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_diagonal","path":"shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_hex_disc","path":"shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_linear_block_offset","path":"shaders/sh_mk_subpixel_linear_block_offset/sh_mk_subpixel_linear_block_offset.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_linear_block","path":"shaders/sh_mk_subpixel_linear_block/sh_mk_subpixel_linear_block.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_linear","path":"shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_square_non","path":"shaders/sh_mk_subpixel_square_non/sh_mk_subpixel_square_non.yy",},},
|
||||
{"id":{"name":"sh_mk_subpixel_square","path":"shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_b","path":"shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_l","path":"shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_r","path":"shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy",},},
|
||||
|
@ -2336,6 +2347,7 @@
|
|||
{"id":{"name":"sh_region_fill_inner","path":"shaders/sh_region_fill_inner/sh_region_fill_inner.yy",},},
|
||||
{"id":{"name":"sh_region_fill_map","path":"shaders/sh_region_fill_map/sh_region_fill_map.yy",},},
|
||||
{"id":{"name":"sh_region_fill_rg_coord","path":"shaders/sh_region_fill_rg_coord/sh_region_fill_rg_coord.yy",},},
|
||||
{"id":{"name":"sh_region_fill_rg_index","path":"shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.yy",},},
|
||||
{"id":{"name":"sh_region_fill_rg_map","path":"shaders/sh_region_fill_rg_map/sh_region_fill_rg_map.yy",},},
|
||||
{"id":{"name":"sh_remove_black","path":"shaders/sh_remove_black/sh_remove_black.yy",},},
|
||||
{"id":{"name":"sh_replace_color","path":"shaders/sh_replace_color/sh_replace_color.yy",},},
|
||||
|
@ -2348,6 +2360,7 @@
|
|||
{"id":{"name":"sh_rsh_rotate","path":"shaders/sh_rsh_rotate/sh_rsh_rotate.yy",},},
|
||||
{"id":{"name":"sh_sample_points","path":"shaders/sh_sample_points/sh_sample_points.yy",},},
|
||||
{"id":{"name":"sh_sample","path":"shaders/sh_sample/sh_sample.yy",},},
|
||||
{"id":{"name":"sh_sao","path":"shaders/sh_sao/sh_sao.yy",},},
|
||||
{"id":{"name":"sh_scale_cleanedge","path":"shaders/sh_scale_cleanedge/sh_scale_cleanedge.yy",},},
|
||||
{"id":{"name":"sh_scale2x","path":"shaders/sh_scale2x/sh_scale2x.yy",},},
|
||||
{"id":{"name":"sh_scale3x","path":"shaders/sh_scale3x/sh_scale3x.yy",},},
|
||||
|
@ -2732,6 +2745,7 @@
|
|||
{"id":{"name":"s_node_alpha_cut","path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},},
|
||||
{"id":{"name":"s_node_alpha_grey","path":"sprites/s_node_alpha_grey/s_node_alpha_grey.yy",},},
|
||||
{"id":{"name":"s_node_animation_control","path":"sprites/s_node_animation_control/s_node_animation_control.yy",},},
|
||||
{"id":{"name":"s_node_AO","path":"sprites/s_node_AO/s_node_AO.yy",},},
|
||||
{"id":{"name":"s_node_area","path":"sprites/s_node_area/s_node_area.yy",},},
|
||||
{"id":{"name":"s_node_argument","path":"sprites/s_node_argument/s_node_argument.yy",},},
|
||||
{"id":{"name":"s_node_armature_bind","path":"sprites/s_node_armature_bind/s_node_armature_bind.yy",},},
|
||||
|
@ -2995,6 +3009,7 @@
|
|||
{"id":{"name":"s_node_mk_rain","path":"sprites/s_node_mk_rain/s_node_mk_rain.yy",},},
|
||||
{"id":{"name":"s_node_mk_saber","path":"sprites/s_node_mk_saber/s_node_mk_saber.yy",},},
|
||||
{"id":{"name":"s_node_mk_sparkle","path":"sprites/s_node_mk_sparkle/s_node_mk_sparkle.yy",},},
|
||||
{"id":{"name":"s_node_mk_subpixel","path":"sprites/s_node_mk_subpixel/s_node_mk_subpixel.yy",},},
|
||||
{"id":{"name":"s_node_mk_tile","path":"sprites/s_node_mk_tile/s_node_mk_tile.yy",},},
|
||||
{"id":{"name":"s_node_monitor_capture","path":"sprites/s_node_monitor_capture/s_node_monitor_capture.yy",},},
|
||||
{"id":{"name":"s_node_morph_surface","path":"sprites/s_node_morph_surface/s_node_morph_surface.yy",},},
|
||||
|
|
|
@ -3,19 +3,20 @@ global.SHAPES = [];
|
|||
enum SHAPE_TYPE {
|
||||
points,
|
||||
triangles,
|
||||
rectangle
|
||||
}
|
||||
|
||||
function SHAPE_rectangle(_sca) {
|
||||
var triangles = [
|
||||
[ new __vec2(-_sca[0], -_sca[1]), new __vec2( _sca[0], -_sca[1]), new __vec2(-_sca[0], _sca[1]) ],
|
||||
[ new __vec2( _sca[0], -_sca[1]), new __vec2(-_sca[0], _sca[1]), new __vec2( _sca[0], _sca[1]) ],
|
||||
[ new __vec2(-_sca[0], -_sca[1]), new __vec2( _sca[0], -_sca[1]), new __vec2(-_sca[0], _sca[1]), c_white ],
|
||||
[ new __vec2( _sca[0], -_sca[1]), new __vec2(-_sca[0], _sca[1]), new __vec2( _sca[0], _sca[1]), c_white ],
|
||||
];
|
||||
var segment = [ new __vec2(-_sca[0], -_sca[1]), new __vec2( _sca[0], -_sca[1]),
|
||||
new __vec2( _sca[0], _sca[1]), new __vec2(-_sca[0], _sca[1]),
|
||||
new __vec2(-_sca[0], -_sca[1]) ];
|
||||
|
||||
return [
|
||||
[ { type: SHAPE_TYPE.triangles, triangles: triangles } ],
|
||||
[ { type: SHAPE_TYPE.rectangle, triangles: triangles } ],
|
||||
segment
|
||||
];
|
||||
}
|
||||
|
@ -40,7 +41,7 @@ function SHAPE_circle(_sca, data = {}) {
|
|||
var x1 = lengthdir_x(_sca[0], d1) + dx;
|
||||
var y1 = lengthdir_y(_sca[1], d1) + dy;
|
||||
|
||||
triangles[i] = [ new __vec2(dx, dy), new __vec2(x0, y0), new __vec2(x1, y1) ];
|
||||
triangles[i] = [ new __vec2(dx, dy), new __vec2(x0, y0), new __vec2(x1, y1), c_white ];
|
||||
|
||||
if(i == 0) segment[0] = new __vec2(x0, y0);
|
||||
segment[i + 1] = new __vec2(x1, y1);
|
||||
|
@ -64,13 +65,13 @@ function SHAPE_star(_sca, data = {}) {
|
|||
|
||||
var inx = lengthdir_x(inner / 2, (i + 0.5) / prec * 360) * _sca[0] * 2;
|
||||
var iny = lengthdir_y(inner / 2, (i + 0.5) / prec * 360) * _sca[1] * 2;
|
||||
array_push(triangles, [ new __vec2(0, 0), new __vec2(otx, oty), new __vec2(inx, iny) ]);
|
||||
array_push(triangles, [ new __vec2(0, 0), new __vec2(otx, oty), new __vec2(inx, iny), c_white ]);
|
||||
|
||||
var pi0 = new __vec2(inx, iny);
|
||||
|
||||
var inx = lengthdir_x(inner / 2, (i - 0.5) / prec * 360) * _sca[0] * 2;
|
||||
var iny = lengthdir_y(inner / 2, (i - 0.5) / prec * 360) * _sca[1] * 2;
|
||||
array_push(triangles, [ new __vec2(0, 0), new __vec2(otx, oty), new __vec2(inx, iny) ]);
|
||||
array_push(triangles, [ new __vec2(0, 0), new __vec2(otx, oty), new __vec2(inx, iny), c_white ]);
|
||||
|
||||
array_push(segment, new __vec2(inx, iny));
|
||||
array_push(segment, new __vec2(otx, oty));
|
||||
|
@ -92,10 +93,10 @@ function SHAPE_capsule(_sca, data = {}) {
|
|||
array_push(segment, new __vec2(-_sca[0] + _sca[1], _sca[1]), new __vec2( _sca[0] - hh, hh));
|
||||
|
||||
var triangles = [
|
||||
[ new __vec2(-_sca[0] + _sca[1], -_sca[1]), new __vec2( _sca[0] - hh, -hh), new __vec2(-_sca[0] + _sca[1], _sca[1]) ],
|
||||
[ new __vec2( _sca[0] - hh, -hh), new __vec2(-_sca[0] + _sca[1], _sca[1]), new __vec2( _sca[0] - hh, hh) ],
|
||||
[ new __vec2(-_sca[0] + _sca[1], -_sca[1]), new __vec2( _sca[0] - hh, -hh), new __vec2(-_sca[0] + _sca[1], _sca[1]), c_white ],
|
||||
[ new __vec2( _sca[0] - hh, -hh), new __vec2(-_sca[0] + _sca[1], _sca[1]), new __vec2( _sca[0] - hh, hh), c_white ],
|
||||
];
|
||||
shapes[0] = { type: SHAPE_TYPE.triangles, triangles: triangles };
|
||||
shapes[0] = { type: SHAPE_TYPE.rectangle, triangles: triangles };
|
||||
|
||||
var triangles = [];
|
||||
var cx = -_sca[0] + _sca[1];
|
||||
|
@ -107,7 +108,7 @@ function SHAPE_capsule(_sca, data = {}) {
|
|||
ny = cy + lengthdir_y(_sca[1], na);
|
||||
|
||||
if(i) {
|
||||
array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny) ]);
|
||||
array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny), c_white ]);
|
||||
array_push(segment, new __vec2(ox, oy));
|
||||
}
|
||||
array_push(segment, new __vec2(nx, ny));
|
||||
|
@ -131,7 +132,7 @@ function SHAPE_capsule(_sca, data = {}) {
|
|||
ny = cy + lengthdir_y(hh, na);
|
||||
|
||||
if(i) {
|
||||
array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny) ]);
|
||||
array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny), c_white ]);
|
||||
array_push(_seg, new __vec2(ox, oy));
|
||||
}
|
||||
array_push(_seg, new __vec2(nx, ny));
|
||||
|
@ -171,8 +172,8 @@ function SHAPE_ring(_sca, data = {}) {
|
|||
var nx1 = lengthdir_x(0.5, (i + 1) / prec * 360) * _sca[0] * 2;
|
||||
var ny1 = lengthdir_y(0.5, (i + 1) / prec * 360) * _sca[1] * 2;
|
||||
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1), c_white ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1), c_white ]);
|
||||
|
||||
if(i == 0)
|
||||
array_push(segment, new __vec2(nx0, ny0));
|
||||
|
@ -180,7 +181,7 @@ function SHAPE_ring(_sca, data = {}) {
|
|||
}
|
||||
|
||||
return [
|
||||
[{ type: SHAPE_TYPE.triangles, triangles: triangles }],
|
||||
[{ type: SHAPE_TYPE.rectangle, triangles: triangles }],
|
||||
segment
|
||||
];
|
||||
}
|
||||
|
@ -209,8 +210,8 @@ function SHAPE_gear(_sca, data = {}) {
|
|||
var nx1 = lengthdir_x(body, (i + 1) / prec * 360) * _sca[0] * 2;
|
||||
var ny1 = lengthdir_y(body, (i + 1) / prec * 360) * _sca[1] * 2;
|
||||
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1), c_white ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1), c_white ]);
|
||||
|
||||
if(i == 0)
|
||||
array_push(segment, new __vec2(nx0, ny0));
|
||||
|
@ -222,8 +223,8 @@ function SHAPE_gear(_sca, data = {}) {
|
|||
var tx1 = nx1 + lengthdir_x(teth, (i + 0.5 + teethT) / prec * 360) * _sca[0] * 2;
|
||||
var ty1 = ny1 + lengthdir_y(teth, (i + 0.5 + teethT) / prec * 360) * _sca[1] * 2;
|
||||
|
||||
array_push(triangles, [ new __vec2(tx0, ty0), new __vec2(nx0, ny0), new __vec2(nx1, ny1) ]);
|
||||
array_push(triangles, [ new __vec2(tx0, ty0), new __vec2(nx1, ny1), new __vec2(tx1, ty1) ]);
|
||||
array_push(triangles, [ new __vec2(tx0, ty0), new __vec2(nx0, ny0), new __vec2(nx1, ny1), c_white ]);
|
||||
array_push(triangles, [ new __vec2(tx0, ty0), new __vec2(nx1, ny1), new __vec2(tx1, ty1), c_white ]);
|
||||
|
||||
array_push(segment, new __vec2(tx0, ty0));
|
||||
array_push(segment, new __vec2(tx1, ty1));
|
||||
|
@ -233,49 +234,49 @@ function SHAPE_gear(_sca, data = {}) {
|
|||
}
|
||||
|
||||
return [
|
||||
[{ type: SHAPE_TYPE.triangles, triangles: triangles }],
|
||||
[{ type: SHAPE_TYPE.rectangle, triangles: triangles }],
|
||||
segment
|
||||
];
|
||||
}
|
||||
|
||||
function SHAPE_cross(_sca, data = {}) {
|
||||
var inner = data.inner;
|
||||
var inner = data.inner;
|
||||
var triangles = [];
|
||||
var segment = [];
|
||||
var side = min(_sca[0], _sca[1]) * inner;
|
||||
var side = min(_sca[0], _sca[1]) * inner;
|
||||
|
||||
array_push(triangles,
|
||||
[ new __vec2(-side, -side), new __vec2( side, -side), new __vec2(-side, side) ],
|
||||
[ new __vec2( side, -side), new __vec2(-side, side), new __vec2( side, side) ],
|
||||
[ new __vec2(-side, -side), new __vec2( side, -side), new __vec2(-side, side), c_white ],
|
||||
[ new __vec2( side, -side), new __vec2(-side, side), new __vec2( side, side), c_white ],
|
||||
);
|
||||
|
||||
array_push(triangles, //top
|
||||
[ new __vec2(-side, -side), new __vec2( side, -side), new __vec2(-side, -_sca[1]) ],
|
||||
[ new __vec2( side, -side), new __vec2(-side, -_sca[1]), new __vec2( side, -_sca[1]) ],
|
||||
[ new __vec2(-side, -side), new __vec2( side, -side), new __vec2(-side, -_sca[1]), c_white ],
|
||||
[ new __vec2( side, -side), new __vec2(-side, -_sca[1]), new __vec2( side, -_sca[1]), c_white ],
|
||||
);
|
||||
|
||||
array_push(triangles, //bottom
|
||||
[ new __vec2(-side, _sca[1]), new __vec2( side, _sca[1]), new __vec2(-side, side) ],
|
||||
[ new __vec2( side, _sca[1]), new __vec2(-side, side), new __vec2( side, side) ],
|
||||
[ new __vec2(-side, _sca[1]), new __vec2( side, _sca[1]), new __vec2(-side, side), c_white ],
|
||||
[ new __vec2( side, _sca[1]), new __vec2(-side, side), new __vec2( side, side), c_white ],
|
||||
);
|
||||
|
||||
array_push(triangles, //left
|
||||
[ new __vec2( -side, -side), new __vec2(-_sca[0], -side), new __vec2(-side, side) ],
|
||||
[ new __vec2(-_sca[0], -side), new __vec2(-side, side), new __vec2(-_sca[0], side) ],
|
||||
[ new __vec2( -side, -side), new __vec2(-_sca[0], -side), new __vec2(-side, side), c_white ],
|
||||
[ new __vec2(-_sca[0], -side), new __vec2(-side, side), new __vec2(-_sca[0], side), c_white ],
|
||||
);
|
||||
|
||||
array_push(triangles, //right
|
||||
[ new __vec2(_sca[0], -side), new __vec2( side, -side), new __vec2(_sca[0], side) ],
|
||||
[ new __vec2( side, -side), new __vec2(_sca[0], side), new __vec2( side, side) ],
|
||||
[ new __vec2(_sca[0], -side), new __vec2( side, -side), new __vec2(_sca[0], side), c_white ],
|
||||
[ new __vec2( side, -side), new __vec2(_sca[0], side), new __vec2( side, side), c_white ],
|
||||
);
|
||||
|
||||
array_push(segment, new __vec2(-side, -side), new __vec2(-side, -_sca[1]), new __vec2( side, -_sca[1]), new __vec2(side, -side) );
|
||||
array_push(segment, new __vec2(_sca[0], -side), new __vec2(_sca[0], side), new __vec2( side, side));
|
||||
array_push(segment, new __vec2(side, _sca[1]), new __vec2(-side, _sca[1]), new __vec2(-side, side));
|
||||
array_push(segment, new __vec2(-_sca[0], side), new __vec2(-_sca[0], -side), new __vec2(-side, -side));
|
||||
array_push(segment, new __vec2(-side, -side), new __vec2(-side, -_sca[1]), new __vec2( side, -_sca[1]), new __vec2(side, -side) );
|
||||
array_push(segment, new __vec2( _sca[0], -side), new __vec2( _sca[0], side), new __vec2( side, side));
|
||||
array_push(segment, new __vec2( side, _sca[1]), new __vec2(-side, _sca[1]), new __vec2(-side, side));
|
||||
array_push(segment, new __vec2(-_sca[0], side), new __vec2(-_sca[0], -side), new __vec2(-side, -side));
|
||||
|
||||
return [
|
||||
[{ type: SHAPE_TYPE.triangles, triangles: triangles }],
|
||||
[{ type: SHAPE_TYPE.rectangle, triangles: triangles }],
|
||||
segment
|
||||
];
|
||||
}
|
||||
|
@ -307,8 +308,8 @@ function SHAPE_arc(_sca, data = {}) {
|
|||
var nx0 = lengthdir_x(0.5, oa) * _sca[0] * 2;
|
||||
var ny0 = lengthdir_y(0.5, oa) * _sca[1] * 2;
|
||||
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1) ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx0, ny0), new __vec2(nx1, ny1), c_white ]);
|
||||
array_push(triangles, [ new __vec2(ix0, iy0), new __vec2(nx1, ny1), new __vec2(ix1, iy1), c_white ]);
|
||||
}
|
||||
|
||||
array_push(sgArcI, new __vec2(ix1, iy1));
|
||||
|
@ -329,7 +330,7 @@ function SHAPE_arc(_sca, data = {}) {
|
|||
nx = cx + lengthdir_x((1 - inner) / 2, na) * _sca[0];
|
||||
ny = cy + lengthdir_y((1 - inner) / 2, na) * _sca[1];
|
||||
|
||||
if(i) array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny) ]);
|
||||
if(i) array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny), c_white ]);
|
||||
|
||||
array_push(sgCapI, new __vec2(nx, ny));
|
||||
|
||||
|
@ -347,7 +348,7 @@ function SHAPE_arc(_sca, data = {}) {
|
|||
nx = cx + lengthdir_x((1 - inner) / 2, na) * _sca[0];
|
||||
ny = cy + lengthdir_y((1 - inner) / 2, na) * _sca[1];
|
||||
|
||||
if(i) array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny) ]);
|
||||
if(i) array_push(triangles, [ new __vec2(cx, cy), new __vec2(ox, oy), new __vec2(nx, ny), c_white ]);
|
||||
|
||||
array_push(sgCapO, new __vec2(nx, ny));
|
||||
|
||||
|
@ -368,7 +369,7 @@ function SHAPE_arc(_sca, data = {}) {
|
|||
}
|
||||
|
||||
return [
|
||||
[{ type: SHAPE_TYPE.triangles, triangles: triangles }],
|
||||
[{ type: SHAPE_TYPE.rectangle, triangles: triangles }],
|
||||
segment
|
||||
];
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
LATEST_VERSION = 1_16_00_0;
|
||||
VERSION = 1_17_11_0;
|
||||
SAVE_VERSION = 1_17_10_0;
|
||||
VERSION_STRING = "1.17.11.001";
|
||||
VERSION_STRING = "1.17.11.002";
|
||||
BUILD_NUMBER = 1_17_11_0;
|
||||
|
||||
HOTKEYS = ds_map_create();
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"nodd_mk_delay_machine",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -343,7 +343,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
wid.setInteract(!jun.hasJunctionFrom());
|
||||
if(_focus) wid.register(_scrollPane);
|
||||
|
||||
if(jun.value_tag == "dimension") {
|
||||
if(is_instanceof(jun, NodeValue_Dimension)) {
|
||||
var _proj = jun.node.attributes.use_project_dimension;
|
||||
|
||||
wid.side_button.icon_index = _proj;
|
||||
|
|
43
scripts/node_ambient_occlusion/node_ambient_occlusion.gml
Normal file
43
scripts/node_ambient_occlusion/node_ambient_occlusion.gml
Normal file
|
@ -0,0 +1,43 @@
|
|||
function Node_Ambient_Occlusion(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "Ambient Occlusion";
|
||||
|
||||
newInput(0, nodeValue_Surface("Height Map", self));
|
||||
|
||||
newInput(1, nodeValue_Float("Intensity", self, 4))
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 8, 0.1 ] });
|
||||
|
||||
newInput(2, nodeValue_Bool("Active", self, true));
|
||||
active_index = 2;
|
||||
|
||||
newInput(3, nodeValue_Float("Height", self, 8));
|
||||
|
||||
newInput(4, nodeValue_Bool("Pixel Sweep", self, true));
|
||||
|
||||
input_display_list = [ 2, 0,
|
||||
["Effect", false], 3, 1, 4,
|
||||
];
|
||||
|
||||
outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone);
|
||||
|
||||
attribute_surface_depth();
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||
var _map = _data[0];
|
||||
var _int = _data[1];
|
||||
var _hei = _data[3];
|
||||
var _pxs = _data[4];
|
||||
|
||||
var _dim = surface_get_dimension(_map);
|
||||
|
||||
surface_set_shader(_outSurf, sh_sao);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("intensity", _int);
|
||||
shader_set_f("height", _hei);
|
||||
shader_set_i("pixel", _pxs);
|
||||
|
||||
draw_surface_safe(_map);
|
||||
surface_reset_shader();
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
}
|
13
scripts/node_ambient_occlusion/node_ambient_occlusion.yy
Normal file
13
scripts/node_ambient_occlusion/node_ambient_occlusion.yy
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"node_ambient_occlusion",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"node_ambient_occlusion",
|
||||
"parent":{
|
||||
"name":"2d_effects",
|
||||
"path":"folders/nodes/data/3D/2d_effects.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
}
|
12
scripts/node_ambient_occlusion/node_bw.yy
Normal file
12
scripts/node_ambient_occlusion/node_bw.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "filter",
|
||||
"path": "folders/nodes/data/filter.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_bw",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_ambient_occlusion/node_color_adjustment.yy
Normal file
12
scripts/node_ambient_occlusion/node_color_adjustment.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "filter",
|
||||
"path": "folders/nodes/data/filter.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_color_adjustment",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_ambient_occlusion/node_color_replacement.yy
Normal file
12
scripts/node_ambient_occlusion/node_color_replacement.yy
Normal 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",
|
||||
}
|
12
scripts/node_ambient_occlusion/node_greyscale.yy
Normal file
12
scripts/node_ambient_occlusion/node_greyscale.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "filter",
|
||||
"path": "folders/nodes/data/filter.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_greyscale",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
12
scripts/node_ambient_occlusion/node_outline.yy
Normal file
12
scripts/node_ambient_occlusion/node_outline.yy
Normal 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",
|
||||
}
|
|
@ -22,12 +22,13 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
new scrollItem("Vertical", s_node_alignment, 1), ]));
|
||||
|
||||
newInput(10, nodeValue_Trigger("Auto fill", self, false, "Automatically set amount based on sprite size."))
|
||||
.setDisplay(VALUE_DISPLAY.button, { name: "Auto fill", UI : true, onClick: function() { #region
|
||||
.setDisplay(VALUE_DISPLAY.button, { name: "Auto fill", UI : true, onClick: function() /*=>*/ {
|
||||
var _sur = getInputData(0);
|
||||
if(!is_surface(_sur) || _sur == DEF_SURFACE) return;
|
||||
var ww = surface_get_width_safe(_sur);
|
||||
var hh = surface_get_height_safe(_sur);
|
||||
|
||||
|
||||
var ww = surface_get_width(_sur);
|
||||
var hh = surface_get_height(_sur);
|
||||
|
||||
var _size = getInputData(1);
|
||||
var _offs = getInputData(4);
|
||||
var _spac = getInputData(5);
|
||||
|
@ -41,10 +42,10 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
inputs[3].setValue([ fill_w, fill_h ]);
|
||||
|
||||
doUpdate();
|
||||
} }); #endregion
|
||||
} });
|
||||
|
||||
newInput(11, nodeValue_Trigger("Sync animation", self, false ))
|
||||
.setDisplay(VALUE_DISPLAY.button, { name: "Sync frames", UI : true, onClick: function() {
|
||||
.setDisplay(VALUE_DISPLAY.button, { name: "Sync frames", UI : true, onClick: function() /*=>*/ {
|
||||
var _atl = outputs[1].getValue();
|
||||
var _spd = getInputData(8);
|
||||
TOTAL_FRAMES = max(1, _spd == 0? 1 : ceil(array_length(_atl) / _spd));
|
||||
|
@ -70,23 +71,23 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
|
||||
attribute_surface_depth();
|
||||
|
||||
drag_type = 0;
|
||||
drag_sx = 0;
|
||||
drag_sy = 0;
|
||||
drag_mx = 0;
|
||||
drag_my = 0;
|
||||
curr_off = [0, 0];
|
||||
curr_dim = [0, 0];
|
||||
curr_amo = [0, 0];
|
||||
drag_type = 0;
|
||||
drag_sx = 0;
|
||||
drag_sy = 0;
|
||||
drag_mx = 0;
|
||||
drag_my = 0;
|
||||
curr_off = [0, 0];
|
||||
curr_dim = [0, 0];
|
||||
curr_amo = [0, 0];
|
||||
|
||||
surf_array = [];
|
||||
atls_array = [];
|
||||
|
||||
surf_array = [];
|
||||
atls_array = [];
|
||||
|
||||
surf_size_w = 1;
|
||||
surf_size_h = 1;
|
||||
|
||||
surf_space = 0;
|
||||
surf_axis = 0;
|
||||
surf_size_w = 1;
|
||||
surf_size_h = 1;
|
||||
|
||||
surf_space = 0;
|
||||
surf_axis = 0;
|
||||
|
||||
sprite_pos = [];
|
||||
sprite_valid = [];
|
||||
|
@ -94,8 +95,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
|
||||
temp_surface = [ noone ];
|
||||
|
||||
static getPreviewValues = function() { return getInputData(0); }
|
||||
|
||||
static getPreviewValues = function() { return getInputData(0); }
|
||||
static onValueFromUpdate = function() { _inSurf = noone; }
|
||||
static onValueUpdate = function() { _inSurf = noone; }
|
||||
|
||||
|
@ -285,25 +285,24 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
}
|
||||
|
||||
static spliceSprite = function() {
|
||||
var _inSurf = getInputData(0);
|
||||
var _inSurf = getInputData(0);
|
||||
if(!is_surface(_inSurf)) return;
|
||||
|
||||
spliceSurf = _inSurf;
|
||||
spliceSurf = _inSurf;
|
||||
|
||||
var _outSurf = outputs[0].getValue();
|
||||
var _out = getInputData(7);
|
||||
var _dim = getInputData(1);
|
||||
var _amo = getInputData(3);
|
||||
var _off = getInputData(4);
|
||||
var _total = _amo[0] * _amo[1];
|
||||
var _pad = getInputData(6);
|
||||
|
||||
surf_space = getInputData(5);
|
||||
surf_axis = getInputData(9);
|
||||
|
||||
var _dim = getInputData(1);
|
||||
var _amo = getInputData(3);
|
||||
var _off = getInputData(4);
|
||||
var _total = _amo[0] * _amo[1];
|
||||
var _pad = getInputData(6);
|
||||
|
||||
surf_space = getInputData(5);
|
||||
surf_axis = getInputData(9);
|
||||
|
||||
var ww = _dim[0] + _pad[0] + _pad[2];
|
||||
var hh = _dim[1] + _pad[1] + _pad[3];
|
||||
var ww = _dim[0] + _pad[0] + _pad[2];
|
||||
var hh = _dim[1] + _pad[1] + _pad[3];
|
||||
|
||||
var _resizeSurf = surf_size_w != ww || surf_size_h != hh;
|
||||
|
||||
|
@ -314,7 +313,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
var _fltp = getInputData(13);
|
||||
var _flcl = getInputData(14);
|
||||
|
||||
var cDep = attrDepth();
|
||||
var cDep = attrDepth();
|
||||
curr_dim = _dim;
|
||||
curr_amo = is_array(_amo)? _amo : [1, 1];
|
||||
curr_off = _off;
|
||||
|
@ -325,13 +324,13 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
var filSize = 4;
|
||||
temp_surface[0] = surface_verify(temp_surface[0], surface_get_width_safe(_inSurf), surface_get_height_safe(_inSurf));
|
||||
|
||||
surface_set_shader(temp_surface[0], sh_slice_spritesheet_empty_scan);
|
||||
surface_set_shader(temp_surface[0], sh_slice_spritesheet_empty_scan, true, BLEND.over);
|
||||
shader_set_dim("dimension", _inSurf);
|
||||
shader_set_f("paddingStart", _off[0], _off[1]);
|
||||
shader_set_f("spacing", surf_space[0], surf_space[1]);
|
||||
shader_set_f("spriteDim", _dim[0], _dim[1]);
|
||||
shader_set_f("paddingStart", _off);
|
||||
shader_set_f("spacing", surf_space);
|
||||
shader_set_f("spriteDim", _dim);
|
||||
shader_set_color("color", _flcl);
|
||||
shader_set_i("empty", !_fltp);
|
||||
shader_set_i("empty", !_fltp);
|
||||
|
||||
draw_surface_safe(_inSurf);
|
||||
surface_reset_shader();
|
||||
|
@ -339,34 +338,24 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
|
||||
var _atl = array_create(_total);
|
||||
var _sar = array_create(_total);
|
||||
var _arrAmo = 0;
|
||||
var _arrAmo = 0, _s, _a;
|
||||
|
||||
for(var i = 0; i < _total; i++)
|
||||
sprite_pos[i] = getSpritePosition(i);
|
||||
|
||||
for(var i = 0; i < _total; i++) {
|
||||
var _s = array_safe_get_fast(surf_array, i);
|
||||
_s = array_safe_get_fast(surf_array, i);
|
||||
_s = surface_verify(_s, ww, hh, cDep);
|
||||
|
||||
if(!is_surface(_s))
|
||||
_s = surface_create(ww, hh, cDep);
|
||||
|
||||
else if(surface_get_format(_s) != cDep) {
|
||||
surface_free(_s);
|
||||
_s = surface_create(ww, hh, cDep);
|
||||
|
||||
} else if(_resizeSurf)
|
||||
surface_resize(_s, ww, hh);
|
||||
|
||||
var _a = array_safe_get_fast(atls_array, i, 0);
|
||||
_a = array_safe_get_fast(atls_array, i, 0);
|
||||
if(_a == 0) _a = new SurfaceAtlas(_s, 0, 0);
|
||||
else _a.setSurface(_s);
|
||||
|
||||
var _spr_pos = sprite_pos[i];
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
surface_set_shader(_s, noone, true, BLEND.over);
|
||||
draw_surface_part(_inSurf, _spr_pos[0], _spr_pos[1], _dim[0], _dim[1], _pad[2], _pad[1]);
|
||||
surface_reset_target();
|
||||
surface_reset_shader();
|
||||
|
||||
_a.x = _spr_pos[0];
|
||||
_a.y = _spr_pos[1];
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_blinker",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_brownian",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_cable",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_fall",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_flag",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_flame",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_flare",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_fracture",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_gridballs",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_gridflip",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_rain",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_saber",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_sparkle",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
89
scripts/node_mk_subpixel/node_mk_subpixel.gml
Normal file
89
scripts/node_mk_subpixel/node_mk_subpixel.gml
Normal file
|
@ -0,0 +1,89 @@
|
|||
function Node_MK_Subpixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "MK Subpixel";
|
||||
|
||||
newInput(0, nodeValue_Dimension(self));
|
||||
|
||||
newInput(1, nodeValue_Enum_Scroll("Type", self, 0, [ "Hex Disc", "Strip", "Linear Block", "Linear Block offset", "Chevron", "Square", "Square Non-Uniform" ]));
|
||||
|
||||
newInput(2, nodeValue_Int("Scale", self, 1));
|
||||
|
||||
newInput(3, nodeValue_Float("Size", self, .6))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(4, nodeValue_Float("Blur", self, .1))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(5, nodeValue_Float("Noise", self, .1))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(6, nodeValue_Float("Intensity", self, 1))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(7, nodeValue_Surface("Surface", self));
|
||||
|
||||
newInput(8, nodeValueSeed(self, VALUE_TYPE.float));
|
||||
|
||||
newInput(9, nodeValue_Float("Ridge amount", self, 8));
|
||||
|
||||
newInput(10, nodeValue_Float("Ridge Intensity", self, 1))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
newInput(11, nodeValue_Bool("Ridge", self, false));
|
||||
|
||||
input_display_list = [ new Inspector_Sprite(s_MKFX), 7,
|
||||
["Subpixel", false], 1, 2,
|
||||
["Effect", false], 3, 4, 8,
|
||||
["Render", false], 6, 5,
|
||||
["Ridge", false, 11], 9, 10,
|
||||
];
|
||||
|
||||
outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone);
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||
var _type = _data[1];
|
||||
var _scal = _data[2];
|
||||
var _size = _data[3];
|
||||
var _blur = _data[4];
|
||||
var _nise = _data[5];
|
||||
var _ints = _data[6];
|
||||
var _surf = _data[7];
|
||||
var _seed = _data[8];
|
||||
var _rgcn = _data[9];
|
||||
var _rgin = _data[10];
|
||||
var _ruse = _data[11];
|
||||
|
||||
var _dim = surface_get_dimension(_surf);
|
||||
var sh = sh_mk_subpixel_hex_disc;
|
||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||
|
||||
switch(_type) {
|
||||
case 0 : sh = sh_mk_subpixel_hex_disc; break;
|
||||
case 1 : sh = sh_mk_subpixel_linear; break;
|
||||
case 2 : sh = sh_mk_subpixel_linear_block; break;
|
||||
case 3 : sh = sh_mk_subpixel_linear_block_offset; break;
|
||||
case 4 : sh = sh_mk_subpixel_chevron; break;
|
||||
case 5 : sh = sh_mk_subpixel_square; break;
|
||||
case 6 : sh = sh_mk_subpixel_square_non; break;
|
||||
case 7 : sh = sh_mk_subpixel_diagonal; break;
|
||||
}
|
||||
|
||||
surface_set_shader(_outSurf, sh);
|
||||
shader_set_surface("texture", _surf);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("seed", _seed / 10000);
|
||||
shader_set_f("scale", _scal);
|
||||
shader_set_f("size", _size);
|
||||
shader_set_f("blur", _blur);
|
||||
shader_set_f("noise", _nise);
|
||||
shader_set_f("intensity", _ints);
|
||||
|
||||
shader_set_i("ridgeUse", _ruse);
|
||||
shader_set_f("ridgeCount", _rgcn);
|
||||
shader_set_f("ridgeIntens", _rgin);
|
||||
|
||||
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1]);
|
||||
surface_reset_shader();
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
}
|
13
scripts/node_mk_subpixel/node_mk_subpixel.yy
Normal file
13
scripts/node_mk_subpixel/node_mk_subpixel.yy
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"$GMScript":"v1",
|
||||
"%Name":"node_mk_subpixel",
|
||||
"isCompatibility":false,
|
||||
"isDnD":false,
|
||||
"name":"node_mk_subpixel",
|
||||
"parent":{
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
}
|
|
@ -5,8 +5,8 @@
|
|||
"isDnD":false,
|
||||
"name":"node_mk_tile",
|
||||
"parent":{
|
||||
"name":"MK_effects",
|
||||
"path":"folders/nodes/data/MK_effects.yy",
|
||||
"name":"MKFX",
|
||||
"path":"folders/nodes/data/MKFX.yy",
|
||||
},
|
||||
"resourceType":"GMScript",
|
||||
"resourceVersion":"2.0",
|
||||
|
|
|
@ -18,7 +18,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
|
||||
newInput(7, nodeValue_Enum_Scroll("Draw original", self, 0, [ "None", "Above", "Behind" ]));
|
||||
|
||||
newInput(8, nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map", "Texture Coord" ]));
|
||||
newInput(8, nodeValue_Enum_Scroll("Fill type", self, 0, [ "Random", "Color map", "Texture map", "Texture Coord", "Texture Index" ]));
|
||||
|
||||
newInput(9, nodeValue_Surface("Color map", self));
|
||||
|
||||
|
@ -76,14 +76,13 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
var base = 0;
|
||||
var cmap = temp_surface[0];
|
||||
|
||||
if(_fclr) {
|
||||
#region filter color
|
||||
surface_set_shader(temp_surface[1], sh_region_fill_init);
|
||||
shader_set_color("targetColor", _targ);
|
||||
|
||||
draw_surface_safe(_surf);
|
||||
surface_reset_shader();
|
||||
#endregion
|
||||
if(_fclr) { // filter color
|
||||
|
||||
surface_set_shader(temp_surface[1], sh_region_fill_init);
|
||||
shader_set_color("targetColor", _targ);
|
||||
|
||||
draw_surface_safe(_surf);
|
||||
surface_reset_shader();
|
||||
|
||||
#region inner region
|
||||
var amo = _sw;
|
||||
|
@ -140,29 +139,25 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
#endregion
|
||||
|
||||
} else {
|
||||
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_all_init);
|
||||
draw_surface_safe(_surf);
|
||||
surface_reset_shader();
|
||||
|
||||
#region coordinate
|
||||
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_all_init);
|
||||
draw_surface_safe(_surf);
|
||||
base = !base;
|
||||
var amo = _sw + _sh;
|
||||
|
||||
repeat( amo ) {
|
||||
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_all);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_surface("base", _surf);
|
||||
|
||||
draw_surface_safe(temp_surface[!base]);
|
||||
surface_reset_shader();
|
||||
|
||||
base = !base;
|
||||
var amo = _sw + _sh;
|
||||
|
||||
repeat( amo ) {
|
||||
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_all);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_surface("base", _surf);
|
||||
|
||||
draw_surface_safe(temp_surface[!base]);
|
||||
surface_reset_shader();
|
||||
|
||||
base = !base;
|
||||
}
|
||||
|
||||
cmap = temp_surface[!base];
|
||||
#endregion
|
||||
}
|
||||
|
||||
cmap = temp_surface[!base];
|
||||
}
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
|
@ -206,6 +201,12 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
draw_surface_safe(cmap);
|
||||
shader_reset();
|
||||
break;
|
||||
|
||||
case 4 : // Texture Index
|
||||
shader_set(sh_region_fill_rg_index);
|
||||
draw_surface_safe(cmap);
|
||||
shader_reset();
|
||||
break;
|
||||
}
|
||||
|
||||
if(_rnbg == 1) draw_surface_safe(_surf); // render original
|
||||
|
|
|
@ -669,10 +669,11 @@ function __initNodes() {
|
|||
var d3d = ds_list_create();
|
||||
addNodeCatagory("3D", d3d);
|
||||
ds_list_add(d3d, "2D Operations");
|
||||
addNodeObject(d3d, "Normal", s_node_normal, "Node_Normal", [1, Node_Normal],, "Create normal map using greyscale value as height.");
|
||||
addNodeObject(d3d, "Normal Light", s_node_normal_light, "Node_Normal_Light", [1, Node_Normal_Light],, "Light up the image using normal mapping.");
|
||||
addNodeObject(d3d, "Bevel", s_node_bevel, "Node_Bevel", [1, Node_Bevel],, "Apply 2D bevel on the image.");
|
||||
addNodeObject(d3d, "Sprite Stack", s_node_stack, "Node_Sprite_Stack", [1, Node_Sprite_Stack],, "Create sprite stack either from repeating a single image or stacking different images using array.");
|
||||
addNodeObject(d3d, "Normal", s_node_normal, "Node_Normal", [1, Node_Normal],, "Create normal map using greyscale value as height.");
|
||||
addNodeObject(d3d, "Normal Light", s_node_normal_light, "Node_Normal_Light", [1, Node_Normal_Light],, "Light up the image using normal mapping.");
|
||||
addNodeObject(d3d, "Bevel", s_node_bevel, "Node_Bevel", [1, Node_Bevel],, "Apply 2D bevel on the image.");
|
||||
addNodeObject(d3d, "Sprite Stack", s_node_stack, "Node_Sprite_Stack", [1, Node_Sprite_Stack],, "Create sprite stack either from repeating a single image or stacking different images using array.");
|
||||
addNodeObject(d3d, "Ambient Occlusion", s_node_AO, "Node_Ambient_Occlusion", [1, Node_Ambient_Occlusion], ["ao"], "Apply simple 2D AO effect using height map.").patreonExtra();
|
||||
|
||||
ds_list_add(d3d, "3D");
|
||||
addNodeObject(d3d, "3D Camera", s_node_3d_camera, "Node_3D_Camera", [1, Node_3D_Camera],, "Create 3D camera that render scene to surface.").setVersion(11510);
|
||||
|
@ -810,7 +811,7 @@ function __initNodes() {
|
|||
addNodeObject(generator, "MK Delay Machine", s_node_mk_delay_machine, "Node_MK_Delay_Machine", [1, Node_MK_Delay_Machine],, "Combines multiple frames of animation into one.").setVersion(11680);
|
||||
addNodeObject(generator, "MK Fracture", s_node_mk_fracture, "Node_MK_Fracture", [1, Node_MK_Fracture],, "Deterministically fracture and image and apply basic physics.").patreonExtra();
|
||||
addNodeObject(generator, "MK Sparkle", s_node_mk_sparkle, "Node_MK_Sparkle", [1, Node_MK_Sparkle],, "Generate random star animation.").patreonExtra();
|
||||
#endregion
|
||||
addNodeObject(generator, "MK Subpixel", s_node_mk_subpixel, "Node_MK_Subpixel", [1, Node_MK_Subpixel],, "Apply subpixel filter on top of a surface.").setVersion(1_17_11_0);
|
||||
|
||||
#region compose
|
||||
var compose = ds_list_create();
|
||||
|
@ -846,7 +847,7 @@ function __initNodes() {
|
|||
addNodeObject(values, "Path", s_node_path, "Node_Path", [1, Node_Path]);
|
||||
addNodeObject(values, "Area", s_node_area, "Node_Area", [1, Node_Area]);
|
||||
addNodeObject(values, "Boolean", s_node_boolean, "Node_Boolean", [1, Node_Boolean]).setVersion(1090);
|
||||
|
||||
|
||||
ds_list_add(values, "Numbers");
|
||||
addNodeObject(values, "Number", s_node_number, "Node_Number", [1, Node_Number]);
|
||||
addNodeObject(values, "To Number", s_node_to_number, "Node_To_Number", [1, Node_To_Number]).setVersion(1145);
|
||||
|
|
|
@ -53,6 +53,20 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
|
||||
newInput(18, nodeValue_Rotation("Piece Rotation", self, 0));
|
||||
|
||||
////////////
|
||||
|
||||
newInput(19, nodeValue_Color("Vertex Color 1", self, c_white));
|
||||
|
||||
newInput(20, nodeValue_Color("Vertex Color 2", self, c_white));
|
||||
|
||||
newInput(21, nodeValue_Color("Vertex Color 3", self, c_white));
|
||||
|
||||
////////////
|
||||
|
||||
newInput(22, nodeValue_Float("Piece Scale", self, 1));
|
||||
|
||||
newInput(23, nodeValue_Palette("Shape Palette", self, [ cola(c_white) ]));
|
||||
|
||||
outputs[0] = nodeValue_Output("Surface out", self, VALUE_TYPE.surface, noone);
|
||||
|
||||
outputs[1] = nodeValue_Output("Mesh", self, VALUE_TYPE.mesh, noone);
|
||||
|
@ -62,8 +76,9 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
input_display_list = [ 16,
|
||||
["Output", false], 0,
|
||||
["Transform", false], 5, 6, 7,
|
||||
["Shape", false], 4, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18,
|
||||
["Render", true], 3,
|
||||
["Shape", false], 4, 8, 9, 10, 11, 12, 13, 14, 15, 17,
|
||||
["Piecewise", false], 18, 22,
|
||||
["Render", true], 3, 23, 19, 20, 21,
|
||||
["Background", true, 1], 2,
|
||||
];
|
||||
|
||||
|
@ -83,12 +98,12 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
path.draw(_x, _y, _s);
|
||||
}
|
||||
|
||||
static vertex_transform = function(_p, _pos, _rot) {
|
||||
static vertex_apply = function(_p, _pos, _rot, _color = c_white, _alpha = 1) {
|
||||
var p = point_rotate(_p.x, _p.y, 0, 0, _rot);
|
||||
_p.x = _pos[0] + p[0];
|
||||
_p.y = _pos[1] + p[1];
|
||||
|
||||
draw_vertex(_p.x, _p.y);
|
||||
draw_vertex_color(_p.x, _p.y, _color, _alpha);
|
||||
}
|
||||
|
||||
mesh = new Mesh();
|
||||
|
@ -114,6 +129,8 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
var _mesh = _data[16];
|
||||
var _expld = _data[17];
|
||||
var _prot = _data[18];
|
||||
var _psca = _data[22];
|
||||
var _pall = _data[23];
|
||||
|
||||
inputs[ 8].setVisible(false);
|
||||
inputs[ 9].setVisible(false);
|
||||
|
@ -173,7 +190,6 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
|
||||
var _outSurf = surface_verify(_outData[0], _dim[0], _dim[1], attrDepth());
|
||||
|
||||
print(attributes.use_project_dimension)
|
||||
var data = {
|
||||
side: _side,
|
||||
inner: _inner,
|
||||
|
@ -186,11 +202,14 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
explode: _expld,
|
||||
};
|
||||
|
||||
var tri0 = colorMultiply(_shc, _data[19]);
|
||||
var tri1 = colorMultiply(_shc, _data[20]);
|
||||
var tri2 = colorMultiply(_shc, _data[21]);
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
if(_bg) draw_clear(_bgc);
|
||||
else DRAW_CLEAR
|
||||
|
||||
draw_set_color(_shc);
|
||||
draw_primitive_begin(pr_trianglelist);
|
||||
|
||||
outputs[2].setVisible(_mesh == noone);
|
||||
|
@ -232,9 +251,9 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
var points = shapeData[0];
|
||||
var segment = shapeData[1];
|
||||
|
||||
if(_prot != 0)
|
||||
if(_prot != 0 || _psca != 1)
|
||||
for( var i = 0, n = array_length(points); i < n; i++ ) {
|
||||
if(points[i].type != SHAPE_TYPE.triangles) continue;
|
||||
if(points[i].type == SHAPE_TYPE.points) continue;
|
||||
|
||||
var _tri = points[i].triangles;
|
||||
for( var j = 0; j < array_length(_tri); j++ ) {
|
||||
|
@ -242,14 +261,17 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
var cx = (tri[0].x + tri[1].x + tri[2].x) / 3;
|
||||
var cy = (tri[0].y + tri[1].y + tri[2].y) / 3;
|
||||
|
||||
var p = point_rotate(tri[0].x, tri[0].y, cx, cy, _prot);
|
||||
tri[0].x = p[0]; tri[0].y = p[1];
|
||||
var p = point_rotate(tri[0].x - cx, tri[0].y - cy, 0, 0, _prot);
|
||||
tri[0].x = cx + _psca * p[0];
|
||||
tri[0].y = cy + _psca * p[1];
|
||||
|
||||
var p = point_rotate(tri[1].x, tri[1].y, cx, cy, _prot);
|
||||
tri[1].x = p[0]; tri[1].y = p[1];
|
||||
var p = point_rotate(tri[1].x - cx, tri[1].y - cy, 0, 0, _prot);
|
||||
tri[1].x = cx + _psca * p[0];
|
||||
tri[1].y = cy + _psca * p[1];
|
||||
|
||||
var p = point_rotate(tri[2].x, tri[2].y, cx, cy, _prot);
|
||||
tri[2].x = p[0]; tri[2].y = p[1];
|
||||
var p = point_rotate(tri[2].x - cx, tri[2].y - cy, 0, 0, _prot);
|
||||
tri[2].x = cx + _psca * p[0];
|
||||
tri[2].y = cy + _psca * p[1];
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -266,21 +288,25 @@ function Node_Shape_Polygon(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
for( var i = 0, n = array_length(points); i < n; i++ ) {
|
||||
if(points[i].type == SHAPE_TYPE.points)
|
||||
shapes[i] = polygon_triangulate(points[i].points)[0];
|
||||
|
||||
else if(points[i].type == SHAPE_TYPE.triangles)
|
||||
else
|
||||
shapes[i] = points[i].triangles;
|
||||
}
|
||||
|
||||
var _plen = array_length(_pall);
|
||||
mesh.triangles = [];
|
||||
for( var i = 0, n = array_length(shapes); i < n; i++ ) {
|
||||
var triangles = shapes[i];
|
||||
var shapetyp = points[i].type;
|
||||
|
||||
for( var j = 0; j < array_length(triangles); j++ ) {
|
||||
var tri = triangles[j];
|
||||
|
||||
vertex_transform(tri[0], _pos, _rot);
|
||||
vertex_transform(tri[1], _pos, _rot);
|
||||
vertex_transform(tri[2], _pos, _rot);
|
||||
var shapeind = shapetyp == SHAPE_TYPE.rectangle? floor(j / 2) : j;
|
||||
var trc = array_safe_get(_pall, shapeind % _plen, c_white)
|
||||
|
||||
vertex_apply(tri[0], _pos, _rot, colorMultiply(trc, tri0));
|
||||
vertex_apply(tri[1], _pos, _rot, colorMultiply(trc, tri1));
|
||||
vertex_apply(tri[2], _pos, _rot, colorMultiply(trc, tri2));
|
||||
|
||||
array_push(mesh.triangles, tri);
|
||||
}
|
||||
|
|
|
@ -1535,6 +1535,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
|
||||
if(!updated) return false; /////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if(is_instanceof(self, NodeValue_Dimension))
|
||||
node.attributes.use_project_dimension = false;
|
||||
|
||||
if(connect_type == CONNECT_TYPE.input && self.index >= 0) {
|
||||
var _val = animator.getValue(time);
|
||||
|
||||
|
|
|
@ -501,10 +501,10 @@
|
|||
registerFunction("", "Nodes Panel", "", MOD_KEY.none, call_panel_Nodes ).setMenuAlt("Nodes", "nodes_panel")
|
||||
registerFunction("", "Tunnels Panel", "", MOD_KEY.none, call_panel_Tunnels ).setMenuAlt("Tunnels", "tunnels_panel")
|
||||
|
||||
registerFunction("", "Color Panel", "", MOD_KEY.none, call_panel_Color ).setMenuAlt("Color", "color_panel")
|
||||
registerFunction("", "Palettes Panel", "", MOD_KEY.none, call_panel_Palette ).setMenuAlt("Palettes", "palettes_panel")
|
||||
registerFunction("", "Palettes Mixer Panel", "", MOD_KEY.none, call_panel_Palette_Mixer ).setMenuAlt("Palettes", "palettes_mixer_panel")
|
||||
registerFunction("", "Gradients Panel", "", MOD_KEY.none, call_panel_Gradient ).setMenuAlt("Gradients", "gradients_panel")
|
||||
registerFunction("", "Color Panel", "", MOD_KEY.none, call_panel_Color ).setMenuAlt("Color", "color_panel")
|
||||
registerFunction("", "Palettes Panel", "", MOD_KEY.none, call_panel_Palette ).setMenuAlt("Palettes", "palettes_panel")
|
||||
registerFunction("", "Palettes Mixer Panel", "", MOD_KEY.none, call_panel_Palette_Mixer ).setMenuAlt("Palettes Mixer", "palettes_mixer_panel")
|
||||
registerFunction("", "Gradients Panel", "", MOD_KEY.none, call_panel_Gradient ).setMenuAlt("Gradients", "gradients_panel")
|
||||
|
||||
registerFunction("", "Console Panel", "", MOD_KEY.none, call_panel_Console ).setMenuAlt("Console", "console_panel")
|
||||
registerFunction("", "Globalvar Panel", "", MOD_KEY.none, call_panel_Globalvar ).setMenuAlt("Globalvar", "globalvar_panel")
|
||||
|
|
|
@ -261,6 +261,7 @@ function Panel_Palette_Mixer() : PanelContent() constructor {
|
|||
|
||||
for (var i = 0, n = array_length(_connections); i < n; i++) {
|
||||
var conn = _connections[i];
|
||||
if(!is_array(conn)) continue;
|
||||
|
||||
var _fr = _palettes[conn[0]];
|
||||
var _to = _palettes[conn[1]];
|
||||
|
|
|
@ -1973,22 +1973,15 @@ function Panel_Preview() : PanelContent() constructor {
|
|||
}
|
||||
|
||||
} else { // color sampler
|
||||
var cx = ui(8);
|
||||
var cy = ui(8);
|
||||
var cx = ui(6);
|
||||
var cy = ui(6);
|
||||
var cw = ui(32);
|
||||
var ch = topbar_height - ui(16);
|
||||
var ch = topbar_height - ui(10);
|
||||
|
||||
if(sample_color != noone) {
|
||||
draw_set_color(sample_color);
|
||||
draw_set_alpha(1);
|
||||
draw_rectangle(cx, cy, cx + cw, cy + ch, false);
|
||||
}
|
||||
|
||||
draw_set_color(COLORS.panel_toolbar_outline);
|
||||
draw_rectangle(cx, cy, cx + cw, cy + ch, true);
|
||||
|
||||
if(sample_color != noone) {
|
||||
var tx = cx + cw + ui(16);
|
||||
drawColor(sample_color, cx, cy, cw, ch);
|
||||
|
||||
var tx = cx + cw + ui(8);
|
||||
var hx = color_get_hex(sample_color);
|
||||
draw_set_text(f_p0, fa_left, fa_center, COLORS._main_text);
|
||||
draw_text(tx, cy + ch / 2, hx);
|
||||
|
|
|
@ -663,7 +663,7 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
|||
}
|
||||
}
|
||||
|
||||
draw_set_text(f_p0b, fa_center, fa_center, COLORS._main_text_sub);
|
||||
draw_set_text(font, fa_center, fa_center, COLORS._main_text_sub);
|
||||
if(key_mod_press(ALT)) draw_text_add(_x + _w - ui(16), _y + _h / 2, "/2");
|
||||
else draw_text_add(_x + _w - ui(16), _y + _h / 2, "x2");
|
||||
draw_set_alpha(1);
|
||||
|
|
|
@ -169,16 +169,16 @@ float random (in vec2 st) { return fract(sin(dot(st.xy + vec2(85.456034, 64.5406
|
|||
|
||||
#endregion //////////////////////////////////// GRADIENT ////////////////////////////////////
|
||||
|
||||
float HexDist(vec2 p) { #region
|
||||
float HexDist(vec2 p) {
|
||||
p = abs(p);
|
||||
|
||||
float c = dot(p, normalize(vec2(1, 1.73)));
|
||||
c = max(c, p.x);
|
||||
|
||||
return c;
|
||||
} #endregion
|
||||
}
|
||||
|
||||
vec4 HexCoords(vec2 uv) { #region
|
||||
vec4 HexCoords(vec2 uv) {
|
||||
vec2 r = vec2(1, sqrt(3.));
|
||||
vec2 h = r * .5;
|
||||
|
||||
|
@ -191,9 +191,9 @@ vec4 HexCoords(vec2 uv) { #region
|
|||
float y = max(0., .5 - HexDist(gv));
|
||||
vec2 id = uv - gv;
|
||||
return vec4(x, y, id.x, id.y);
|
||||
} #endregion
|
||||
}
|
||||
|
||||
void main() { #region
|
||||
void main() {
|
||||
#region params
|
||||
vec2 sca = scale;
|
||||
if(scaleUseSurf == 1) {
|
||||
|
@ -239,9 +239,6 @@ void main() { #region
|
|||
|
||||
colr = gradientEval(random(uv));
|
||||
} else if(mode == 2) {
|
||||
//vec2 uv = hc.xy;
|
||||
//uv.x = (uv.x + PI / 2.) / PI;
|
||||
|
||||
vec2 uv = (pos - hc.zw) + vec2(0.5, 0.5);
|
||||
|
||||
if(textureTruchet == 1) { //lmao wtf is this code?
|
||||
|
@ -273,4 +270,4 @@ void main() { #region
|
|||
|
||||
float _aa = 3. / max(dimension.x, dimension.y);
|
||||
gl_FragColor = mix(gapCol, colr, aa == 1? smoothstep(thk - _aa, thk, hc.y) : step(thk, hc.y));
|
||||
} #endregion
|
||||
}
|
85
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh
Normal file
85
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.fsh
Normal file
|
@ -0,0 +1,85 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
return id.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz - blur / 2., siz + blur / 2., dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 oid = floor(pos);
|
||||
vec2 opx = fract(pos);
|
||||
if(opx.y >= .5)
|
||||
pos.x += (opx.y - .5) * .5;
|
||||
else
|
||||
pos.x -= (opx.y - .5) * .5;
|
||||
|
||||
vec2 sc = vec2(3., 2.);
|
||||
vec2 id = floor(pos * sc);
|
||||
vec2 px = pos * sc - id;
|
||||
vec2 uv = id / sc / scs + .5;
|
||||
|
||||
float siz = 1. - size;
|
||||
float ind = index(id);
|
||||
int indx = int(mod(ind, 3.));
|
||||
int indy = int(mod(id.y, 2.));
|
||||
|
||||
vec2 cn = vec2(.5);
|
||||
if(indx == 0) cn.x = .5 + siz * .5;
|
||||
else if(indx == 1) cn.x = .5;
|
||||
else if(indx == 2) cn.x = .5 - siz * .5;
|
||||
|
||||
if(indy == 0) cn.y = .5 + siz * .5;
|
||||
else if(indy == 1) cn.y = .5 - siz * .5;
|
||||
|
||||
float dist = 1. - pow(pow(px.x - cn.x, 8.) + pow(px.y - cn.y, 8.), 1. / 8.) * 2.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(px.x * TAU * ridgeCount)), 2.));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
19
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.vsh
Normal file
19
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.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;
|
||||
}
|
12
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.yy
Normal file
12
shaders/sh_mk_subpixel_chevron/sh_mk_subpixel_chevron.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_chevron",
|
||||
"name":"sh_mk_subpixel_chevron",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
87
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh
Normal file
87
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.fsh
Normal file
|
@ -0,0 +1,87 @@
|
|||
#define s3 1.
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
float md(float val, float div) { return val - floor(val / div) * div; }
|
||||
vec2 md(vec2 val, vec2 div) { return vec2(md(val.x, div.x), md(val.y, div.y)); }
|
||||
|
||||
float round(float val) { return fract(val) >= 0.5? ceil(val) : floor(val); }
|
||||
vec2 round(vec2 val) { return vec2(round(val.x), round(val.y)); }
|
||||
|
||||
float HexDist(vec2 p) {
|
||||
p = abs(p);
|
||||
float c = dot(p, normalize(vec2(1, 1.73)));
|
||||
c = max(c, p.x);
|
||||
return c;
|
||||
}
|
||||
|
||||
vec2 HexCoords(vec2 uv) {
|
||||
vec2 r = vec2(1, s3);
|
||||
vec2 h = r * .5;
|
||||
|
||||
vec2 a = md(uv, r) - h;
|
||||
vec2 b = md(uv - h, r) - h;
|
||||
|
||||
vec2 gv = dot(a, a) <= dot(b, b) ? a : b;
|
||||
return uv - gv;
|
||||
}
|
||||
|
||||
float index(vec2 id) {
|
||||
vec2 r = vec2(1, s3);
|
||||
vec2 dd = floor(ceil(id / r));
|
||||
return dd.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz, siz + blur, dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = scale * vec2(2.);
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 hex = HexCoords(pos);
|
||||
vec2 id = hex;
|
||||
|
||||
vec2 ppx = abs(pos - id);
|
||||
float dist = 1. - (ppx.x + ppx.y);
|
||||
float siz = 1. - size / 2.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
float ind = index(id);
|
||||
|
||||
id = abs(dimension + id);
|
||||
if(md(id.y, s3) > s3 / 2.) ind += 2.;
|
||||
|
||||
int indx = int(mod(ind, 3.));
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec2 uv = (hex / scs + .5) / vec2(dimension.x / dimension.y, 1.);
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
// gl_FragColor = vec4((id - dimension) / 8., 0., 1.);
|
||||
// gl_FragColor = vec4(abs(v_vTexcoord - uv) * 16., 0., 1.);
|
||||
}
|
19
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.vsh
Normal file
19
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.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;
|
||||
}
|
12
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.yy
Normal file
12
shaders/sh_mk_subpixel_diagonal/sh_mk_subpixel_diagonal.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_diagonal",
|
||||
"name":"sh_mk_subpixel_diagonal",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
96
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh
Normal file
96
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.fsh
Normal file
|
@ -0,0 +1,96 @@
|
|||
#define TAU 6.28318530718
|
||||
#define s3 1.5
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
float md(float val, float div) { return val - floor(val / div) * div; }
|
||||
vec2 md(vec2 val, vec2 div) { return vec2(md(val.x, div.x), md(val.y, div.y)); }
|
||||
|
||||
float round(float val) { return fract(val) >= 0.5? ceil(val) : floor(val); }
|
||||
vec2 round(vec2 val) { return vec2(round(val.x), round(val.y)); }
|
||||
|
||||
float HexDist(vec2 p) {
|
||||
p = abs(p);
|
||||
float c = dot(p, normalize(vec2(1, 1.73)));
|
||||
c = max(c, p.x);
|
||||
return c;
|
||||
}
|
||||
|
||||
vec2 HexCoords(vec2 uv) {
|
||||
vec2 r = vec2(1, s3);
|
||||
vec2 h = r * .5;
|
||||
|
||||
vec2 a = md(uv, r) - h;
|
||||
vec2 b = md(uv - h, r) - h;
|
||||
|
||||
vec2 gv = dot(a, a) <= dot(b, b) ? a : b;
|
||||
return uv - gv;
|
||||
}
|
||||
|
||||
float index(vec2 id) {
|
||||
vec2 r = vec2(1, s3);
|
||||
vec2 dd = floor(ceil(id / r));
|
||||
return dd.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz, siz + blur, dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = scale * vec2(3., s3 * 2.);
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 hex = HexCoords(pos);
|
||||
vec2 id = hex;
|
||||
|
||||
float dist = 1. - distance(pos, id);
|
||||
float siz = 1. - size / 2.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
float ind = index(id);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(dist * TAU * ridgeCount)), 2.));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
id = abs(dimension + id);
|
||||
if(md(id.y, s3) > s3 / 2.) ind += 1.;
|
||||
|
||||
int indx = int(mod(ind, 3.));
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec2 uv = (hex / scs + .5) / vec2(dimension.x / dimension.y, 1.);
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
// gl_FragColor = vec4((id - dimension) / 8., 0., 1.);
|
||||
// gl_FragColor = vec4(abs(v_vTexcoord - uv) * 16., 0., 1.);
|
||||
}
|
19
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.vsh
Normal file
19
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.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;
|
||||
}
|
12
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.yy
Normal file
12
shaders/sh_mk_subpixel_hex_disc/sh_mk_subpixel_hex_disc.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_hex_disc",
|
||||
"name":"sh_mk_subpixel_hex_disc",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
68
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh
Normal file
68
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.fsh
Normal file
|
@ -0,0 +1,68 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
return id.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz - blur / 2., siz + blur / 2., dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 sc = vec2(3., 1.);
|
||||
vec2 id = floor(pos * sc);
|
||||
vec2 px = pos * sc - id;
|
||||
vec2 uv = id / sc / scs + .5;
|
||||
|
||||
float dist = (1. - abs(px.x - .5) * 2.) * pow(1. - abs(px.y - .5) * 2., .1);
|
||||
float siz = 1. - size;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
float ind = index(id);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(px.y * TAU * ridgeCount)), 2.));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
int indx = int(mod(ind, 3.));
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
19
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.vsh
Normal file
19
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.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;
|
||||
}
|
12
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.yy
Normal file
12
shaders/sh_mk_subpixel_linear/sh_mk_subpixel_linear.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_linear",
|
||||
"name":"sh_mk_subpixel_linear",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
|
@ -0,0 +1,75 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
return id.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz - blur / 2., siz + blur / 2., dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 sc = vec2(3., 1.);
|
||||
vec2 id = floor(pos * sc);
|
||||
vec2 px = pos * sc - id;
|
||||
vec2 uv = id / sc / scs + .5;
|
||||
|
||||
float siz = 1. - size;
|
||||
float ind = index(id);
|
||||
int indx = int(mod(ind, 3.));
|
||||
|
||||
vec2 cn = vec2(.5);
|
||||
if(indx == 0) cn.x = .5 + siz * .5;
|
||||
else if(indx == 1) cn.x = .5;
|
||||
else if(indx == 2) cn.x = .5 - siz * .5;
|
||||
|
||||
float dist = 1. - pow(pow(px.x - cn.x, 4.) + pow(px.y - cn.y, 4.), 1. / 4.) * 2.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(((px.x * .1 * (px.y > 0.5? 1. : -1.)) + px.y) * TAU * ridgeCount)), 2.));
|
||||
ridge *= smoothstep(.0, .1 / ridgeCount, abs(px.y - .5));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_linear_block",
|
||||
"name":"sh_mk_subpixel_linear_block",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
return id.x;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz - blur / 2., siz + blur / 2., dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 oid = floor(pos);
|
||||
if(mod(oid.x, 2.) >= 1.)
|
||||
pos.y += .5;
|
||||
|
||||
vec2 sc = vec2(3., 1.);
|
||||
vec2 id = floor(pos * sc);
|
||||
vec2 px = pos * sc - id;
|
||||
vec2 uv = id / sc / scs + .5;
|
||||
|
||||
float siz = 1. - size;
|
||||
float ind = index(id);
|
||||
int indx = int(mod(ind, 3.));
|
||||
|
||||
vec2 cn = vec2(.5);
|
||||
if(indx == 0) cn.x = .5 + siz * .5;
|
||||
else if(indx == 1) cn.x = .5;
|
||||
else if(indx == 2) cn.x = .5 - siz * .5;
|
||||
|
||||
float dist = 1. - pow(pow(px.x - cn.x, 4.) + pow(px.y - cn.y, 4.), 1. / 4.) * 2.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(((px.x * .1 * (px.y > 0.5? 1. : -1.)) + px.y) * TAU * ridgeCount)), 2.));
|
||||
ridge *= smoothstep(.0, .1 / ridgeCount, abs(px.y - .5));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_linear_block_offset",
|
||||
"name":"sh_mk_subpixel_linear_block_offset",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
76
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh
Normal file
76
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.fsh
Normal file
|
@ -0,0 +1,76 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
if(id.y > 0.5) return 1.;
|
||||
if(id.x > 0.5) return 2.;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz, siz + blur, dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 id = floor(pos);
|
||||
vec2 px = pos - id;
|
||||
vec2 uv = id / scs + .5;
|
||||
|
||||
float siz = 1. - size;
|
||||
float ind = index(px);
|
||||
int indx = int(mod(ind, 3.));
|
||||
|
||||
float sz = siz * .15;
|
||||
vec2 cn = vec2(.5);
|
||||
if(indx == 0) cn = vec2(.25 + sz, .25 + sz);
|
||||
else if(indx == 1) cn = vec2(.50, .75 - sz);
|
||||
else if(indx == 2) cn = vec2(.75 - sz, .25 + sz);
|
||||
|
||||
float dist = 1. - pow(pow(px.x - cn.x, 6.) + pow(px.y - cn.y, 6.), 1. / 6.) * 4.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(px.x * TAU * ridgeCount)), 2.));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
19
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.vsh
Normal file
19
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.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;
|
||||
}
|
12
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.yy
Normal file
12
shaders/sh_mk_subpixel_square/sh_mk_subpixel_square.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_square",
|
||||
"name":"sh_mk_subpixel_square",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
|
@ -0,0 +1,78 @@
|
|||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform sampler2D texture;
|
||||
uniform vec2 dimension;
|
||||
uniform float seed;
|
||||
uniform float scale;
|
||||
uniform float size;
|
||||
uniform float blur;
|
||||
uniform float noise;
|
||||
uniform float intensity;
|
||||
|
||||
#define TAU 6.28318530718
|
||||
uniform int ridgeUse;
|
||||
uniform float ridgeCount;
|
||||
uniform float ridgeIntens;
|
||||
|
||||
float random (in vec2 st, float seed) { return fract(sin(dot(st.xy + seed, vec2(1892.9898, 78.23453))) * 437.54123); }
|
||||
|
||||
float index(vec2 id) {
|
||||
if(id.x > 0.5) return 2.;
|
||||
if(id.y < 0.6) return 1.;
|
||||
return 0.;
|
||||
}
|
||||
|
||||
float fnoise(vec2 pos, float siz, float dist) {
|
||||
float lig = smoothstep(siz, siz + blur, dist);
|
||||
float rin = smoothstep(blur, 1. + blur, dist);
|
||||
float rnd = random(pos, seed);
|
||||
rnd = .5 + (rnd - .5) * 4.;
|
||||
lig = mix(lig, lig * rnd, noise * (1. - rin));
|
||||
|
||||
return lig;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 scs = vec2(scale) * 2.;
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos *= scs;
|
||||
|
||||
vec2 id = floor(pos);
|
||||
vec2 px = pos - id;
|
||||
vec2 uv = id / scs + .5;
|
||||
|
||||
float siz = 1. - size;
|
||||
float ind = index(px);
|
||||
int indx = int(mod(ind, 3.));
|
||||
|
||||
float sz = siz * .1;
|
||||
vec2 cn = vec2(.5);
|
||||
vec2 dn = vec2(0.);
|
||||
|
||||
if(indx == 0) { cn = vec2(.25 + sz, .80 - sz); dn = (px - cn) / vec2(1., 0.8); }
|
||||
else if(indx == 1) { cn = vec2(.25 + sz, .30 + sz); dn = (px - cn) / vec2(1., 1.2); }
|
||||
else if(indx == 2) { cn = vec2(.75 - sz, .50); dn = (px - cn) / vec2(1., 2.0); }
|
||||
|
||||
float dist = 1. - pow(pow(dn.x, 6.) + pow(dn.y, 6.), 1. / 6.) * 4.;
|
||||
float lig = fnoise(pos, siz, dist);
|
||||
|
||||
if(ridgeUse == 1) {
|
||||
float ridge = smoothstep(.0, ridgeIntens, pow(abs(sin(px.x * TAU * ridgeCount)), 2.));
|
||||
lig = mix(lig, lig * ridge, 1.);
|
||||
}
|
||||
|
||||
vec3 clr = vec3(0.);
|
||||
if(indx == 0) clr.r = intensity;
|
||||
else if(indx == 1) clr.g = intensity;
|
||||
else if(indx == 2) clr.b = intensity;
|
||||
clr *= lig;
|
||||
|
||||
vec3 baseC = texture2D( texture, uv ).rgb;
|
||||
baseC.rgb *= clr;
|
||||
|
||||
gl_FragColor = vec4(baseC, 1.);
|
||||
|
||||
// gl_FragColor = vec4(px, 0., 1.);
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_mk_subpixel_square_non",
|
||||
"name":"sh_mk_subpixel_square_non",
|
||||
"parent":{
|
||||
"name":"Subpixel",
|
||||
"path":"folders/shader/MK effects/Subpixel.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
13
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh
Normal file
13
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.fsh
Normal file
|
@ -0,0 +1,13 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 c = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
|
||||
if(c.rgb == vec3(0.)) {
|
||||
gl_FragColor = vec4(0.);
|
||||
return;
|
||||
}
|
||||
|
||||
gl_FragColor = vec4( c.xy, 0., 1. );
|
||||
}
|
19
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.vsh
Normal file
19
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.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;
|
||||
}
|
12
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.yy
Normal file
12
shaders/sh_region_fill_rg_index/sh_region_fill_rg_index.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_region_fill_rg_index",
|
||||
"name":"sh_region_fill_rg_index",
|
||||
"parent":{
|
||||
"name":"region",
|
||||
"path":"folders/shader/generator/region.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
48
shaders/sh_sao/sh_sao.fsh
Normal file
48
shaders/sh_sao/sh_sao.fsh
Normal file
|
@ -0,0 +1,48 @@
|
|||
#define TAU 6.283185307179586
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform float intensity;
|
||||
uniform float height;
|
||||
uniform int pixel;
|
||||
|
||||
float h(vec4 c) { return (c.r + c.g + c.b) / 3. * c.a; }
|
||||
|
||||
void main() {
|
||||
vec2 tx = 1. / dimension;
|
||||
float dd = length(tx);
|
||||
float ch = h(texture2D( gm_BaseTexture, v_vTexcoord ));
|
||||
float aa = 0.;
|
||||
|
||||
float base = 1.;
|
||||
float top = 0.;
|
||||
|
||||
for(float j = 0.; j <= 64.; j++) {
|
||||
float ang = pixel == 1? top / base * TAU : j / 64. * TAU;
|
||||
float ad = 0.;
|
||||
|
||||
top += 2.;
|
||||
if(top >= base) {
|
||||
top = 1.;
|
||||
base *= 2.;
|
||||
}
|
||||
|
||||
for(float i = 0.; i <= height; i++) {
|
||||
|
||||
vec2 txs = v_vTexcoord + vec2( cos(ang), sin(ang)) * i * tx;
|
||||
float hh = h(texture2D( gm_BaseTexture, txs ));
|
||||
|
||||
float dh = (hh - ch) * height;
|
||||
float di = (dh - i) / dh;
|
||||
float ao = max(0., hh - ch) * di * intensity;
|
||||
|
||||
ad = max(ad, ao);
|
||||
}
|
||||
|
||||
aa += ad / 64.;
|
||||
}
|
||||
|
||||
gl_FragColor = vec4(vec3(max(.0, 1. - aa)), 1.);
|
||||
}
|
19
shaders/sh_sao/sh_sao.vsh
Normal file
19
shaders/sh_sao/sh_sao.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;
|
||||
}
|
12
shaders/sh_sao/sh_sao.yy
Normal file
12
shaders/sh_sao/sh_sao.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"$GMShader":"",
|
||||
"%Name":"sh_sao",
|
||||
"name":"sh_sao",
|
||||
"parent":{
|
||||
"name":"2d effect",
|
||||
"path":"folders/shader/3d/2d effect.yy",
|
||||
},
|
||||
"resourceType":"GMShader",
|
||||
"resourceVersion":"2.0",
|
||||
"type":1,
|
||||
}
|
|
@ -29,7 +29,7 @@
|
|||
"origin":4,
|
||||
"parent":{
|
||||
"name":"src",
|
||||
"path":"folders/nodes/data/MK_effects/src.yy",
|
||||
"path":"folders/nodes/data/MKFX/src.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"origin":4,
|
||||
"parent":{
|
||||
"name":"src",
|
||||
"path":"folders/nodes/data/MK_effects/src.yy",
|
||||
"path":"folders/nodes/data/MKFX/src.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
"origin":4,
|
||||
"parent":{
|
||||
"name":"src",
|
||||
"path":"folders/nodes/data/MK_effects/src.yy",
|
||||
"path":"folders/nodes/data/MKFX/src.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
|
|
BIN
sprites/s_node_AO/282b8c13-46bb-46dc-832d-70d0958e0f5c.png
Normal file
BIN
sprites/s_node_AO/282b8c13-46bb-46dc-832d-70d0958e0f5c.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
90
sprites/s_node_AO/s_node_AO.yy
Normal file
90
sprites/s_node_AO/s_node_AO.yy
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"$GMSprite":"",
|
||||
"%Name":"s_node_AO",
|
||||
"bboxMode":0,
|
||||
"bbox_bottom":63,
|
||||
"bbox_left":0,
|
||||
"bbox_right":63,
|
||||
"bbox_top":0,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"282b8c13-46bb-46dc-832d-70d0958e0f5c","name":"282b8c13-46bb-46dc-832d-70d0958e0f5c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":64,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"f61bfe0e-340f-4c81-a527-c9e3f88fcc8d","blendMode":0,"displayName":"default","isLocked":false,"name":"f61bfe0e-340f-4c81-a527-c9e3f88fcc8d","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_node_AO",
|
||||
"nineSlice":null,
|
||||
"origin":4,
|
||||
"parent":{
|
||||
"name":"3D",
|
||||
"path":"folders/nodes/icons/3D.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
"resourceVersion":"2.0",
|
||||
"sequence":{
|
||||
"$GMSequence":"",
|
||||
"%Name":"s_node_AO",
|
||||
"autoRecord":true,
|
||||
"backdropHeight":768,
|
||||
"backdropImageOpacity":0.5,
|
||||
"backdropImagePath":"",
|
||||
"backdropWidth":1366,
|
||||
"backdropXOffset":0.0,
|
||||
"backdropYOffset":0.0,
|
||||
"events":{
|
||||
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":1.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"name":"s_node_AO",
|
||||
"playback":1,
|
||||
"playbackSpeed":30.0,
|
||||
"playbackSpeedType":0,
|
||||
"resourceType":"GMSequence",
|
||||
"resourceVersion":"2.0",
|
||||
"showBackdrop":true,
|
||||
"showBackdropImage":false,
|
||||
"timeUnits":1,
|
||||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"282b8c13-46bb-46dc-832d-70d0958e0f5c","path":"sprites/s_node_AO/s_node_AO.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"9e8cb385-60ce-47ff-98e4-909c2bcb07cb","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
"volume":1.0,
|
||||
"xorigin":32,
|
||||
"yorigin":32,
|
||||
},
|
||||
"swatchColours":null,
|
||||
"swfPrecision":0.5,
|
||||
"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 |
90
sprites/s_node_mk_subpixel/s_node_mk_subpixel.yy
Normal file
90
sprites/s_node_mk_subpixel/s_node_mk_subpixel.yy
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"$GMSprite":"",
|
||||
"%Name":"s_node_mk_subpixel",
|
||||
"bboxMode":0,
|
||||
"bbox_bottom":63,
|
||||
"bbox_left":0,
|
||||
"bbox_right":63,
|
||||
"bbox_top":0,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"be46676b-0e8e-43b4-82b9-8790809618fd","name":"be46676b-0e8e-43b4-82b9-8790809618fd","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":64,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"94269e92-dbb0-4f02-b997-0ad66f6292ab","blendMode":0,"displayName":"default","isLocked":false,"name":"94269e92-dbb0-4f02-b997-0ad66f6292ab","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_node_mk_subpixel",
|
||||
"nineSlice":null,
|
||||
"origin":4,
|
||||
"parent":{
|
||||
"name":"MK effects",
|
||||
"path":"folders/nodes/icons/MK effects.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
"resourceVersion":"2.0",
|
||||
"sequence":{
|
||||
"$GMSequence":"",
|
||||
"%Name":"s_node_mk_subpixel",
|
||||
"autoRecord":true,
|
||||
"backdropHeight":768,
|
||||
"backdropImageOpacity":0.5,
|
||||
"backdropImagePath":"",
|
||||
"backdropWidth":1366,
|
||||
"backdropXOffset":0.0,
|
||||
"backdropYOffset":0.0,
|
||||
"events":{
|
||||
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":1.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"name":"s_node_mk_subpixel",
|
||||
"playback":1,
|
||||
"playbackSpeed":30.0,
|
||||
"playbackSpeedType":0,
|
||||
"resourceType":"GMSequence",
|
||||
"resourceVersion":"2.0",
|
||||
"showBackdrop":true,
|
||||
"showBackdropImage":false,
|
||||
"timeUnits":1,
|
||||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"be46676b-0e8e-43b4-82b9-8790809618fd","path":"sprites/s_node_mk_subpixel/s_node_mk_subpixel.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"8c669a07-fe8e-4206-af51-08f6d4c5454e","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
"volume":1.0,
|
||||
"xorigin":32,
|
||||
"yorigin":32,
|
||||
},
|
||||
"swatchColours":null,
|
||||
"swfPrecision":0.5,
|
||||
"textureGroupId":{
|
||||
"name":"Default",
|
||||
"path":"texturegroups/Default",
|
||||
},
|
||||
"type":0,
|
||||
"VTile":false,
|
||||
"width":64,
|
||||
}
|
Loading…
Add table
Reference in a new issue