mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-24 20:08:04 +01:00
MK Tile
This commit is contained in:
parent
68ff4e1e38
commit
746dee6593
30 changed files with 977 additions and 9 deletions
|
@ -225,6 +225,7 @@
|
|||
{"name":"misc","order":13,"path":"folders/shader/misc.yy",},
|
||||
{"name":"find boundary","order":9,"path":"folders/shader/misc/find boundary.yy",},
|
||||
{"name":"MK effects","order":22,"path":"folders/shader/MK effects.yy",},
|
||||
{"name":"Tile","order":7,"path":"folders/shader/MK effects/Tile.yy",},
|
||||
{"name":"morph","order":17,"path":"folders/shader/morph.yy",},
|
||||
{"name":"pixel builder","order":18,"path":"folders/shader/pixel builder.yy",},
|
||||
{"name":"shape seperator","order":5,"path":"folders/shader/shape seperator.yy",},
|
||||
|
@ -270,6 +271,7 @@
|
|||
{"name":"sh_dither","order":28,"path":"shaders/sh_dither/sh_dither.yy",},
|
||||
{"name":"__vec2","order":7,"path":"scripts/__vec2/__vec2.yy",},
|
||||
{"name":"node_region_fill","order":18,"path":"scripts/node_region_fill/node_region_fill.yy",},
|
||||
{"name":"sh_mk_tile55_edge_r","order":7,"path":"shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy",},
|
||||
{"name":"sh_d3d_normal","order":18,"path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},
|
||||
{"name":"s_node_text_file_read","order":13,"path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},
|
||||
{"name":"s_node_text_trim","order":7,"path":"sprites/s_node_text_trim/s_node_text_trim.yy",},
|
||||
|
@ -291,6 +293,7 @@
|
|||
{"name":"o_dialog_file_name_collection","order":6,"path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},
|
||||
{"name":"node_line","order":3,"path":"scripts/node_line/node_line.yy",},
|
||||
{"name":"s_node_frame","order":1,"path":"sprites/s_node_frame/s_node_frame.yy",},
|
||||
{"name":"sh_mk_tile18_edge_r","order":2,"path":"shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy",},
|
||||
{"name":"node_active_canvas","order":22,"path":"scripts/node_active_canvas/node_active_canvas.yy",},
|
||||
{"name":"s_node_fluidSim_turbulence","order":10,"path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",},
|
||||
{"name":"windowManager","order":1,"path":"scripts/windowManager/windowManager.yy",},
|
||||
|
@ -428,6 +431,7 @@
|
|||
{"name":"o_dialog_group_input_order","order":3,"path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},
|
||||
{"name":"node_string_get_char","order":5,"path":"scripts/node_string_get_char/node_string_get_char.yy",},
|
||||
{"name":"_p_dialog_undo_block","order":1,"path":"objects/_p_dialog_undo_block/_p_dialog_undo_block.yy",},
|
||||
{"name":"sh_mk_tile18_edge_l","order":1,"path":"shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy",},
|
||||
{"name":"sh_palette_shift","order":19,"path":"shaders/sh_palette_shift/sh_palette_shift.yy",},
|
||||
{"name":"node_array_copy","order":14,"path":"scripts/node_array_copy/node_array_copy.yy",},
|
||||
{"name":"draw_line_elbow","order":17,"path":"scripts/draw_line_elbow/draw_line_elbow.yy",},
|
||||
|
@ -715,6 +719,7 @@
|
|||
{"name":"s_node_path_wave","order":7,"path":"sprites/s_node_path_wave/s_node_path_wave.yy",},
|
||||
{"name":"string_functions","order":6,"path":"scripts/string_functions/string_functions.yy",},
|
||||
{"name":"o_dialog_palette","order":2,"path":"objects/o_dialog_palette/o_dialog_palette.yy",},
|
||||
{"name":"sh_mk_tile55_edge_b","order":5,"path":"shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.yy",},
|
||||
{"name":"sh_blend_hue","order":17,"path":"shaders/sh_blend_hue/sh_blend_hue.yy",},
|
||||
{"name":"s_node_threshold","order":47,"path":"sprites/s_node_threshold/s_node_threshold.yy",},
|
||||
{"name":"Obj_FirebaseFirestore_Collection_Read","order":2,"path":"objects/Obj_FirebaseFirestore_Collection_Read/Obj_FirebaseFirestore_Collection_Read.yy",},
|
||||
|
@ -763,6 +768,7 @@
|
|||
{"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",},
|
||||
{"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",},
|
||||
{"name":"node_pb_draw_diamond","order":10,"path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",},
|
||||
{"name":"sh_mk_tile55_edge_l","order":6,"path":"shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.yy",},
|
||||
{"name":"s_node_3d_point_affector","order":21,"path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},
|
||||
{"name":"polygon_points","order":2,"path":"scripts/polygon_points/polygon_points.yy",},
|
||||
{"name":"transformBox","order":15,"path":"scripts/transformBox/transformBox.yy",},
|
||||
|
@ -772,6 +778,7 @@
|
|||
{"name":"node_crop","order":7,"path":"scripts/node_crop/node_crop.yy",},
|
||||
{"name":"s_biterator_tab_content","order":14,"path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},
|
||||
{"name":"fd_rectangle_get_material_maccormack_weight","order":11,"path":"scripts/fd_rectangle_get_material_maccormack_weight/fd_rectangle_get_material_maccormack_weight.yy",},
|
||||
{"name":"sh_mk_tile55_edge_t","order":4,"path":"shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.yy",},
|
||||
{"name":"s_node_lua_compute","order":17,"path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",},
|
||||
{"name":"FirebaseREST_Firestore_getURL","order":10,"path":"scripts/FirebaseREST_Firestore_getURL/FirebaseREST_Firestore_getURL.yy",},
|
||||
{"name":"buttonPalette","order":4,"path":"scripts/buttonPalette/buttonPalette.yy",},
|
||||
|
@ -824,6 +831,7 @@
|
|||
{"name":"node_plot_linear","order":12,"path":"scripts/node_plot_linear/node_plot_linear.yy",},
|
||||
{"name":"addon_lua_constant","order":5,"path":"scripts/addon_lua_constant/addon_lua_constant.yy",},
|
||||
{"name":"sh_fd_velocity_combine","order":21,"path":"shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.yy",},
|
||||
{"name":"node_mk_tile","order":6,"path":"scripts/node_mk_tile/node_mk_tile.yy",},
|
||||
{"name":"sh_scale2x","order":27,"path":"shaders/sh_scale2x/sh_scale2x.yy",},
|
||||
{"name":"ds_priority","order":3,"path":"scripts/ds_priority/ds_priority.yy",},
|
||||
{"name":"node_to_text","order":11,"path":"scripts/node_to_text/node_to_text.yy",},
|
||||
|
@ -1109,6 +1117,7 @@
|
|||
{"name":"sh_d3d_shadow_cube_depth","order":20,"path":"shaders/sh_d3d_shadow_cube_depth/sh_d3d_shadow_cube_depth.yy",},
|
||||
{"name":"s_node_vfx_spawn","order":2,"path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},
|
||||
{"name":"__vec3","order":8,"path":"scripts/__vec3/__vec3.yy",},
|
||||
{"name":"sh_mk_tile18_edge_t","order":3,"path":"shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.yy",},
|
||||
{"name":"texture_set_repeat","order":1,"path":"scripts/texture_set_repeat/texture_set_repeat.yy",},
|
||||
{"name":"node_VFX_effect_oscillate","order":9,"path":"scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.yy",},
|
||||
{"name":"o_dialog_color_quick_pick","order":5,"path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",},
|
||||
|
|
|
@ -257,6 +257,7 @@
|
|||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"misc","folderPath":"folders/shader/misc.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"find boundary","folderPath":"folders/shader/misc/find boundary.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"MK effects","folderPath":"folders/shader/MK effects.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Tile","folderPath":"folders/shader/MK effects/Tile.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"morph","folderPath":"folders/shader/morph.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"pixel builder","folderPath":"folders/shader/pixel builder.yy",},
|
||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"shape seperator","folderPath":"folders/shader/shape seperator.yy",},
|
||||
|
@ -840,6 +841,7 @@
|
|||
{"id":{"name":"__vec2","path":"scripts/__vec2/__vec2.yy",},},
|
||||
{"id":{"name":"control_function","path":"scripts/control_function/control_function.yy",},},
|
||||
{"id":{"name":"node_region_fill","path":"scripts/node_region_fill/node_region_fill.yy",},},
|
||||
{"id":{"name":"sh_mk_tile55_edge_r","path":"shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy",},},
|
||||
{"id":{"name":"sh_d3d_normal","path":"shaders/sh_d3d_normal/sh_d3d_normal.yy",},},
|
||||
{"id":{"name":"panel_data","path":"scripts/panel_data/panel_data.yy",},},
|
||||
{"id":{"name":"s_node_text_file_read","path":"sprites/s_node_text_file_read/s_node_text_file_read.yy",},},
|
||||
|
@ -863,6 +865,7 @@
|
|||
{"id":{"name":"__node_3d_prim_cone","path":"scripts/__node_3d_prim_cone/__node_3d_prim_cone.yy",},},
|
||||
{"id":{"name":"node_line","path":"scripts/node_line/node_line.yy",},},
|
||||
{"id":{"name":"s_node_frame","path":"sprites/s_node_frame/s_node_frame.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_r","path":"shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy",},},
|
||||
{"id":{"name":"node_active_canvas","path":"scripts/node_active_canvas/node_active_canvas.yy",},},
|
||||
{"id":{"name":"s_node_fluidSim_turbulence","path":"sprites/s_node_fluidSim_turbulence/s_node_fluidSim_turbulence.yy",},},
|
||||
{"id":{"name":"windowManager","path":"scripts/windowManager/windowManager.yy",},},
|
||||
|
@ -1019,6 +1022,7 @@
|
|||
{"id":{"name":"o_dialog_group_input_order","path":"objects/o_dialog_group_input_order/o_dialog_group_input_order.yy",},},
|
||||
{"id":{"name":"node_string_get_char","path":"scripts/node_string_get_char/node_string_get_char.yy",},},
|
||||
{"id":{"name":"_p_dialog_undo_block","path":"objects/_p_dialog_undo_block/_p_dialog_undo_block.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_l","path":"shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy",},},
|
||||
{"id":{"name":"sh_palette_shift","path":"shaders/sh_palette_shift/sh_palette_shift.yy",},},
|
||||
{"id":{"name":"node_array_copy","path":"scripts/node_array_copy/node_array_copy.yy",},},
|
||||
{"id":{"name":"draw_line_elbow","path":"scripts/draw_line_elbow/draw_line_elbow.yy",},},
|
||||
|
@ -1348,6 +1352,7 @@
|
|||
{"id":{"name":"s_node_path_wave","path":"sprites/s_node_path_wave/s_node_path_wave.yy",},},
|
||||
{"id":{"name":"string_functions","path":"scripts/string_functions/string_functions.yy",},},
|
||||
{"id":{"name":"o_dialog_palette","path":"objects/o_dialog_palette/o_dialog_palette.yy",},},
|
||||
{"id":{"name":"sh_mk_tile55_edge_b","path":"shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.yy",},},
|
||||
{"id":{"name":"sh_blend_hue","path":"shaders/sh_blend_hue/sh_blend_hue.yy",},},
|
||||
{"id":{"name":"_f_p0","path":"fonts/_f_p0/_f_p0.yy",},},
|
||||
{"id":{"name":"s_node_threshold","path":"sprites/s_node_threshold/s_node_threshold.yy",},},
|
||||
|
@ -1404,6 +1409,7 @@
|
|||
{"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},},
|
||||
{"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},},
|
||||
{"id":{"name":"node_pb_draw_diamond","path":"scripts/node_pb_draw_diamond/node_pb_draw_diamond.yy",},},
|
||||
{"id":{"name":"sh_mk_tile55_edge_l","path":"shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.yy",},},
|
||||
{"id":{"name":"s_node_3d_point_affector","path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},},
|
||||
{"id":{"name":"polygon_points","path":"scripts/polygon_points/polygon_points.yy",},},
|
||||
{"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},},
|
||||
|
@ -1415,6 +1421,7 @@
|
|||
{"id":{"name":"node_crop","path":"scripts/node_crop/node_crop.yy",},},
|
||||
{"id":{"name":"s_biterator_tab_content","path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},},
|
||||
{"id":{"name":"fd_rectangle_get_material_maccormack_weight","path":"scripts/fd_rectangle_get_material_maccormack_weight/fd_rectangle_get_material_maccormack_weight.yy",},},
|
||||
{"id":{"name":"sh_mk_tile55_edge_t","path":"shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.yy",},},
|
||||
{"id":{"name":"s_node_lua_compute","path":"sprites/s_node_lua_compute/s_node_lua_compute.yy",},},
|
||||
{"id":{"name":"FirebaseREST_Firestore_getURL","path":"scripts/FirebaseREST_Firestore_getURL/FirebaseREST_Firestore_getURL.yy",},},
|
||||
{"id":{"name":"buttonPalette","path":"scripts/buttonPalette/buttonPalette.yy",},},
|
||||
|
@ -1472,6 +1479,7 @@
|
|||
{"id":{"name":"node_plot_linear","path":"scripts/node_plot_linear/node_plot_linear.yy",},},
|
||||
{"id":{"name":"addon_lua_constant","path":"scripts/addon_lua_constant/addon_lua_constant.yy",},},
|
||||
{"id":{"name":"sh_fd_velocity_combine","path":"shaders/sh_fd_velocity_combine/sh_fd_velocity_combine.yy",},},
|
||||
{"id":{"name":"node_mk_tile","path":"scripts/node_mk_tile/node_mk_tile.yy",},},
|
||||
{"id":{"name":"sh_scale2x","path":"shaders/sh_scale2x/sh_scale2x.yy",},},
|
||||
{"id":{"name":"ds_priority","path":"scripts/ds_priority/ds_priority.yy",},},
|
||||
{"id":{"name":"node_number","path":"scripts/node_number/node_number.yy",},},
|
||||
|
@ -1793,6 +1801,7 @@
|
|||
{"id":{"name":"sh_camera","path":"shaders/sh_camera/sh_camera.yy",},},
|
||||
{"id":{"name":"s_node_vfx_spawn","path":"sprites/s_node_vfx_spawn/s_node_vfx_spawn.yy",},},
|
||||
{"id":{"name":"__vec3","path":"scripts/__vec3/__vec3.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_t","path":"shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.yy",},},
|
||||
{"id":{"name":"texture_set_repeat","path":"scripts/texture_set_repeat/texture_set_repeat.yy",},},
|
||||
{"id":{"name":"node_VFX_effect_oscillate","path":"scripts/node_VFX_effect_oscillate/node_VFX_effect_oscillate.yy",},},
|
||||
{"id":{"name":"o_dialog_color_quick_pick","path":"objects/o_dialog_color_quick_pick/o_dialog_color_quick_pick.yy",},},
|
||||
|
@ -1866,6 +1875,7 @@
|
|||
{"id":{"name":"__node_3d_mesh","path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",},},
|
||||
{"id":{"name":"Obj_FirebaseFirestore_Collection_Query","path":"objects/Obj_FirebaseFirestore_Collection_Query/Obj_FirebaseFirestore_Collection_Query.yy",},},
|
||||
{"id":{"name":"d3d_surface_extrude","path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",},},
|
||||
{"id":{"name":"sh_mk_tile18_edge_b","path":"shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.yy",},},
|
||||
{"id":{"name":"node_mesh_to_path","path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",},},
|
||||
{"id":{"name":"node_fluid_sim","path":"scripts/node_fluid_sim/node_fluid_sim.yy",},},
|
||||
{"id":{"name":"sh_convolution","path":"shaders/sh_convolution/sh_convolution.yy",},},
|
||||
|
|
357
scripts/node_mk_tile/node_mk_tile.gml
Normal file
357
scripts/node_mk_tile/node_mk_tile.gml
Normal file
|
@ -0,0 +1,357 @@
|
|||
function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "MK Tile";
|
||||
dimension_index = -1;
|
||||
|
||||
inputs[| 0] = nodeValue("Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 1] = nodeValue("Background Texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Corner (18 sprites)", "Corner + Side (55 sprites)" ] );
|
||||
|
||||
inputs[| 3] = nodeValue("Output Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Sheet", "Array" ] );
|
||||
|
||||
inputs[| 4] = nodeValue("Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 8, 8, 8, 8 ])
|
||||
.setDisplay(VALUE_DISPLAY.padding);
|
||||
|
||||
inputs[| 5] = nodeValue("Edge Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_button, [ "Uniform", "Individual" ] );
|
||||
|
||||
inputs[| 6] = nodeValue("Edge", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 7] = nodeValue("Edge bottom", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 8] = nodeValue("Edge left", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 9] = nodeValue("Edge right", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||
|
||||
inputs[| 10] = nodeValue("Edge shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ])
|
||||
.setDisplay(VALUE_DISPLAY.padding);
|
||||
|
||||
input_display_list = [
|
||||
["Surfaces", false], 0, 1,
|
||||
["Tiling", false], 2, 4,
|
||||
["Edge", false], 10, 5, 6, 7, 8, 9,
|
||||
["Output", false], 3,
|
||||
];
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
temp_surface = array_create(55);
|
||||
for( var i = 0, n = array_length(temp_surface); i < n; i++ )
|
||||
temp_surface[i] = array_create(1, 1);
|
||||
|
||||
__edge_surface = array_create(4);
|
||||
edge_surface = [];
|
||||
|
||||
index_18 = [ 0, 8, 12, 4, 7, 11,
|
||||
0, 10, 15, 5, 13, 14,
|
||||
0, 2, 3, 1, 9, 6];
|
||||
|
||||
index_55 = [208, 224, 104, 64, /**/ 80, 120, 216, 72, /**/ 88, 219, -1,
|
||||
148, 255, 41, 66, /**/ 86, 127, 223, 75, /**/ 95, 126, -1,
|
||||
22, 7, 11, 2, /**/ 210, 251, 254, 106, /**/ 250, 218, 122,
|
||||
16, 24, 8, 0, /**/ 18, 27, 30, 10, /**/ 26, 94, 91,
|
||||
-1, -1, -1, -1, /**/ 82, 123, 222, 74, /**/ 90, -1, -1];
|
||||
|
||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||
|
||||
} #endregion
|
||||
|
||||
static step = function() { #region
|
||||
var _edgType = getSingleValue(5);
|
||||
|
||||
inputs[| 6].name = _edgType == 1? "Edge top" : "Edge"
|
||||
inputs[| 7].setVisible(_edgType == 1, _edgType == 1);
|
||||
inputs[| 8].setVisible(_edgType == 1, _edgType == 1);
|
||||
inputs[| 9].setVisible(_edgType == 1, _edgType == 1);
|
||||
} #endregion
|
||||
|
||||
static generate18 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
||||
var _sprs = array_create(18);
|
||||
var _use1 = is_surface(_tex1);
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
|
||||
var r = _crop[0];
|
||||
var t = _crop[1];
|
||||
var l = _crop[2];
|
||||
var b = _crop[3];
|
||||
|
||||
var _edgType = _data[5];
|
||||
var _et = _edge[0]; var _uet = is_surface(_et);
|
||||
var _eb = _edge[1]; var _ueb = is_surface(_eb);
|
||||
var _el = _edge[2]; var _uel = is_surface(_el);
|
||||
var _er = _edge[3]; var _uer = is_surface(_er);
|
||||
|
||||
for( var i = 0; i < 18; i++ ) {
|
||||
var _index = index_18[i];
|
||||
if(_index < 0) {
|
||||
_sprs[i] = noone;
|
||||
continue;
|
||||
}
|
||||
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
BLEND_ALPHA_MULP
|
||||
|
||||
if(_index == 15) draw_surface(_tex0, 0, 0);
|
||||
else if(_use1) draw_surface(_tex1, 0, 0);
|
||||
|
||||
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||
if(_index & 0b0100) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
||||
if(_index & 0b1000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
||||
|
||||
if(_index & 0b1100 >= 0b1100) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
||||
if(_index & 0b1010 >= 0b1010) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
||||
if(_index & 0b0101 >= 0b0101) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
||||
if(_index & 0b0011 >= 0b0011) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
||||
|
||||
if(_uel) { #region
|
||||
shader_set(sh_mk_tile18_edge_l);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_uer) { #region
|
||||
shader_set(sh_mk_tile18_edge_r);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_uet) { #region
|
||||
shader_set(sh_mk_tile18_edge_t);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_ueb) { #region
|
||||
shader_set(sh_mk_tile18_edge_b);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
_sprs[i] = _s;
|
||||
}
|
||||
|
||||
return _sprs;
|
||||
} #endregion
|
||||
|
||||
static generate55 = function(_data, _tex0, _tex1, _edge, _crop) { #region
|
||||
var _sprs = array_create(55);
|
||||
var _use1 = is_surface(_tex1);
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
|
||||
var r = _crop[0];
|
||||
var t = _crop[1];
|
||||
var l = _crop[2];
|
||||
var b = _crop[3];
|
||||
|
||||
var _et = _edge[0]; var _uet = is_surface(_et);
|
||||
var _eb = _edge[1]; var _ueb = is_surface(_eb);
|
||||
var _el = _edge[2]; var _uel = is_surface(_el);
|
||||
var _er = _edge[3]; var _uer = is_surface(_er);
|
||||
|
||||
for( var i = 0; i < 55; i++ ) {
|
||||
var _index = index_55[i];
|
||||
if(_index < 0) {
|
||||
_sprs[i] = noone;
|
||||
continue;
|
||||
}
|
||||
|
||||
var _s = surface_verify(temp_surface[i], _sw, _sh);
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
BLEND_ALPHA_MULP
|
||||
|
||||
if(_use1) draw_surface(_tex1, 0, 0);
|
||||
|
||||
if(_index == 255) draw_surface(_tex0, 0, 0);
|
||||
else draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t - b, l, t);
|
||||
|
||||
if(_index & 0b0100_0000 >= 0b0100_0000) draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t, l, t);
|
||||
if(_index & 0b0000_0010 >= 0b0000_0010) draw_surface_part(_tex0, l, 0, _sw - l - r, _sh - b, l, 0);
|
||||
if(_index & 0b0001_0000 >= 0b0001_0000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t - b, l, t);
|
||||
if(_index & 0b0000_1000 >= 0b0000_1000) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t - b, 0, t);
|
||||
|
||||
if(_index & 0b1110_0000 >= 0b1110_0000) draw_surface_part(_tex0, 0, t, _sw, _sh - t, 0, t);
|
||||
if(_index & 0b1001_0100 >= 0b1001_0100) draw_surface_part(_tex0, l, 0, _sw - l, _sh, l, 0);
|
||||
if(_index & 0b0010_1001 >= 0b0010_1001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh, 0, 0);
|
||||
if(_index & 0b0000_0111 >= 0b0000_0111) draw_surface_part(_tex0, 0, 0, _sw, _sh - b, 0, 0);
|
||||
|
||||
if(_index & 0b1101_0000 >= 0b1101_0000) draw_surface_part(_tex0, l, t, _sw - l, _sh - t, l, t);
|
||||
if(_index & 0b0110_1000 >= 0b0110_1000) draw_surface_part(_tex0, 0, t, _sw - r, _sh - t, 0, t);
|
||||
if(_index & 0b0000_1011 >= 0b0000_1011) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
|
||||
if(_index & 0b0001_0110 >= 0b0001_0110) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
|
||||
|
||||
if(_uel) { #region
|
||||
shader_set(sh_mk_tile55_edge_l);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_el, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_uer) { #region
|
||||
shader_set(sh_mk_tile55_edge_r);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_er, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_uet) { #region
|
||||
shader_set(sh_mk_tile55_edge_t);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_et, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
if(_ueb) { #region
|
||||
shader_set(sh_mk_tile55_edge_b);
|
||||
shader_set_f("dimension", _sw, _sh);
|
||||
shader_set_f("crop", _crop);
|
||||
shader_set_i("edge", _index);
|
||||
|
||||
draw_surface_ext(_eb, 0, 0, 1, 1, 0, c_white, 1);
|
||||
shader_reset();
|
||||
} #endregion
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
_sprs[i] = _s;
|
||||
}
|
||||
|
||||
return _sprs;
|
||||
} #endregion
|
||||
|
||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
||||
var _tex0 = _data[0];
|
||||
var _tex1 = _data[1];
|
||||
var _type = _data[2];
|
||||
var _outp = _data[3];
|
||||
var _crop = _data[4];
|
||||
|
||||
var _edgType = _data[5];
|
||||
var _edgeShf = _data[10];
|
||||
var _edges = _edgType == 0? [ _data[6], _data[6], _data[6], _data[6] ] : [ _data[6], _data[7], _data[8], _data[9] ];
|
||||
var _edge;
|
||||
|
||||
var _rt = [ 0, 180, 90, 270 ];
|
||||
var _sh = [ 1, 3, 2, 0 ];
|
||||
|
||||
for( var i = 0; i < 4; i++ ) {
|
||||
var _ed = _edges[i];
|
||||
if(!is_surface(_ed)) {
|
||||
edge_surface[i] = noone;
|
||||
continue;
|
||||
}
|
||||
|
||||
var _ew = surface_get_width_safe(_ed);
|
||||
var _eh = surface_get_height_safe(_ed);
|
||||
|
||||
var _edShf = _edgeShf[_sh[i]];
|
||||
|
||||
__edge_surface[i] = surface_verify(__edge_surface[i], _ew, _eh);
|
||||
surface_set_target(__edge_surface[i]);
|
||||
DRAW_CLEAR
|
||||
BLEND_OVERRIDE
|
||||
|
||||
if(_edgType == 0) {
|
||||
var p = point_rotate(0, 0, _ew / 2, _eh / 2, _rt[i]);
|
||||
switch(i) {
|
||||
case 0 : p[1] += _edShf; break;
|
||||
case 1 : p[1] -= _edShf; break;
|
||||
case 2 : p[0] += _edShf; break;
|
||||
case 3 : p[0] -= _edShf; break;
|
||||
}
|
||||
|
||||
draw_surface_ext(_ed, p[0], p[1], 1, 1, _rt[i], c_white, 1);
|
||||
|
||||
} else {
|
||||
switch(i) {
|
||||
case 0 : draw_surface(_ed, 0, _edShf); break;
|
||||
case 1 : draw_surface(_ed, 0, -_edShf); break;
|
||||
case 2 : draw_surface(_ed, _edShf, 0); break;
|
||||
case 3 : draw_surface(_ed, -_edShf, 0); break;
|
||||
}
|
||||
}
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
edge_surface[i] = __edge_surface[i];
|
||||
}
|
||||
|
||||
_edge = edge_surface;
|
||||
|
||||
if(!is_surface(_tex0)) return _outSurf;
|
||||
|
||||
var _surfs = _type == 0? generate18(_data, _tex0, _tex1, _edge, _crop) : generate55(_data, _tex0, _tex1, _edge, _crop);
|
||||
|
||||
if(_outp == 1) return _surfs;
|
||||
|
||||
var _sw = surface_get_width_safe(_tex0);
|
||||
var _sh = surface_get_height_safe(_tex0);
|
||||
var _col = _type == 0? 6 : 11;
|
||||
var _row = _type == 0? 3 : 5;
|
||||
|
||||
var _w = _sw * _col;
|
||||
var _h = _sh * _row;
|
||||
_outSurf = surface_verify(_outSurf, _w, _h);
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
DRAW_CLEAR
|
||||
BLEND_OVERRIDE
|
||||
|
||||
for( var i = 0, n = array_length(_surfs); i < n; i++ ) {
|
||||
var _surf = _surfs[i];
|
||||
if(!is_surface(_surf)) continue;
|
||||
|
||||
var _r = floor(i / _col);
|
||||
var _c = i % _col;
|
||||
|
||||
var _x = _sw * _c;
|
||||
var _y = _sh * _r;
|
||||
|
||||
draw_surface(_surf, _x, _y);
|
||||
}
|
||||
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
}
|
11
scripts/node_mk_tile/node_mk_tile.yy
Normal file
11
scripts/node_mk_tile/node_mk_tile.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_mk_tile",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "MK effects",
|
||||
"path": "folders/nodes/data/MK effects.yy",
|
||||
},
|
||||
}
|
|
@ -618,6 +618,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
|||
addNodeObject(generator, "MK GridBalls", s_node_mk_ball_grid, "Node_MK_GridBalls", [1, Node_MK_GridBalls]).setVersion(11600);
|
||||
addNodeObject(generator, "MK GridFlip", s_node_mk_flip_grid, "Node_MK_GridFlip", [1, Node_MK_GridFlip]).setVersion(11600);
|
||||
addNodeObject(generator, "MK Saber", s_node_mk_saber, "Node_MK_Saber", [1, Node_MK_Saber]).setVersion(11600);
|
||||
if(TESTING) addNodeObject(generator, "MK Tile", s_node_mk_saber, "Node_MK_Tile", [1, Node_MK_Tile]).setVersion(11600);
|
||||
#endregion
|
||||
|
||||
var compose = ds_list_create(); #region
|
||||
|
|
|
@ -843,7 +843,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
return setValueDirect(val, index);
|
||||
} );
|
||||
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
if(!struct_has(display_data, "linked")) display_data.linked = false;
|
||||
|
||||
|
@ -867,7 +867,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
if(struct_has(display_data, "linked")) editWidget.linked = display_data.linked;
|
||||
if(struct_has(display_data, "side_button")) editWidget.side_button = display_data.side_button;
|
||||
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
if(len == 2) {
|
||||
extract_node = [ "Node_Vector2", "Node_Path" ];
|
||||
|
@ -897,7 +897,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
return setValueDirect(val, index);
|
||||
}, unit );
|
||||
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
if(!struct_has(display_data, "linked")) display_data.linked = false;
|
||||
|
||||
|
@ -944,7 +944,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
editWidget = new slider(_range[0], _range[1], _range[2], function(val) {
|
||||
return setValueDirect(toNumber(val));
|
||||
} );
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
if(struct_has(display_data, "update_stat"))
|
||||
editWidget.update_stat = display_data.update_stat;
|
||||
|
@ -957,7 +957,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
editWidget = new sliderRange(_range[0], _range[1], _range[2], function(index, val) {
|
||||
return setValueDirect(val, index);
|
||||
} );
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||
animators[i].suffix = " " + array_safe_get(global.displaySuffix_Range, i);
|
||||
|
@ -969,7 +969,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
return setValueDirect(val, index);
|
||||
}, unit);
|
||||
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
if(struct_has(display_data, "onSurfaceSize")) editWidget.onSurfaceSize = display_data.onSurfaceSize;
|
||||
|
||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||
|
@ -984,7 +984,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
//_val[index] = val;
|
||||
return setValueDirect(val, index);
|
||||
}, unit);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||
animators[i].suffix = " " + array_safe_get(global.displaySuffix_Padding, i);
|
||||
|
@ -995,7 +995,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
editWidget = new cornerBox(function(index, val) {
|
||||
return setValueDirect(val, index);
|
||||
}, unit);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||
animators[i].suffix = " " + array_safe_get(global.displaySuffix_Padding, i);
|
||||
|
@ -1042,7 +1042,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
editWidget = new matrixGrid(_txt, display_data.size, function(index, val) {
|
||||
return setValueDirect(val, index);
|
||||
}, unit );
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1);
|
||||
if(type == VALUE_TYPE.integer) editWidget.setSlideSpeed(1 / 10);
|
||||
|
||||
for( var i = 0, n = array_length(animators); i < n; i++ )
|
||||
animators[i].suffix = " " + string(i);
|
||||
|
|
43
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh
Normal file
43
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.fsh
Normal file
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 2) {
|
||||
if(tx.x < w - tx.y) discard;
|
||||
|
||||
} else if(edge == 3) {
|
||||
|
||||
} else if(edge == 1) {
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else if(edge == 7) {
|
||||
if(tx.x + crop[2] < tx.y + crop[1]) discard;
|
||||
|
||||
} else if(edge == 11) {
|
||||
if(tx.x - crop[0] > h - tx.y - crop[3]) discard;
|
||||
|
||||
} else if(edge == 9) {
|
||||
if(tx.x + crop[2] > tx.y + crop[3]) discard;
|
||||
|
||||
} else if(edge == 6) {
|
||||
if(tx.x - crop[0] < h - tx.y - crop[1]) discard;
|
||||
|
||||
} else {
|
||||
discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh
Normal file
18
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.yy
Normal file
10
shaders/sh_mk_tile18_edge_b/sh_mk_tile18_edge_b.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile18_edge_b",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
43
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh
Normal file
43
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.fsh
Normal file
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 8) {
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else if(edge == 10) {
|
||||
|
||||
} else if(edge == 2) {
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else if(edge == 11) {
|
||||
if(tx.x + crop[0] < h - tx.y + crop[3]) discard;
|
||||
|
||||
} else if(edge == 14) {
|
||||
if(tx.x + crop[0] < tx.y + crop[3]) discard;
|
||||
|
||||
} else if(edge == 6) {
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else if(edge == 9) {
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else {
|
||||
discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh
Normal file
18
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy
Normal file
10
shaders/sh_mk_tile18_edge_l/sh_mk_tile18_edge_l.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile18_edge_l",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
43
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh
Normal file
43
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.fsh
Normal file
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 4) {
|
||||
if(tx.x < h - tx.y) discard;
|
||||
|
||||
} else if(edge == 5) {
|
||||
|
||||
} else if(edge == 1) {
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else if(edge == 7) {
|
||||
if(tx.x + crop[0] > tx.y + crop[3]) discard;
|
||||
|
||||
} else if(edge == 13) {
|
||||
if(tx.x + crop[0] > h - tx.y + crop[3]) discard;
|
||||
|
||||
} else if(edge == 9) {
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else if(edge == 6) {
|
||||
if(tx.x < h - tx.y) discard;
|
||||
|
||||
} else {
|
||||
discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh
Normal file
18
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy
Normal file
10
shaders/sh_mk_tile18_edge_r/sh_mk_tile18_edge_r.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile18_edge_r",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
43
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh
Normal file
43
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.fsh
Normal file
|
@ -0,0 +1,43 @@
|
|||
//
|
||||
// Simple passthrough fragment shader
|
||||
//
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 8) {
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else if(edge == 12) {
|
||||
|
||||
} else if(edge == 4) {
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else if(edge == 13) {
|
||||
if(tx.x - crop[2] < h - tx.y - crop[3]) discard;
|
||||
|
||||
} else if(edge == 14) {
|
||||
if(tx.x + crop[0] > tx.y + crop[1]) discard;
|
||||
|
||||
} else if(edge == 9) {
|
||||
if(tx.x - crop[2] < tx.y - crop[1]) discard;
|
||||
|
||||
} else if(edge == 6) {
|
||||
if(tx.x + crop[0] > h - tx.y + crop[3]) discard;
|
||||
|
||||
} else {
|
||||
discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh
Normal file
18
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.yy
Normal file
10
shaders/sh_mk_tile18_edge_t/sh_mk_tile18_edge_t.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile18_edge_t",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
46
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh
Normal file
46
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.fsh
Normal file
|
@ -0,0 +1,46 @@
|
|||
//////////////// 55 Tile Bottom ////////////////
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 22 || edge == 16 || edge == 18) {
|
||||
if(tx.x < w - tx.y) discard;
|
||||
|
||||
} else if(edge == 7 || edge == 24 || edge == 27 || edge == 30 || edge == 26 ) {
|
||||
|
||||
} else if(edge == 11 || edge == 8 || edge == 10) {
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else if(edge == 2 || edge == 0) {
|
||||
if(tx.x < w - tx.y) discard;
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else {
|
||||
bool draw = false;
|
||||
|
||||
if(edge == 80 || edge == 120 || edge == 86 || edge == 127 || edge == 82 || edge == 123 || edge == 88 || edge == 95 || edge == 126 || edge == 122 || edge == 94 || edge == 91 || edge == 90) {
|
||||
if(tx.x + crop[2] >= tx.y + crop[1])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(edge == 216 || edge == 72 || edge == 223 || edge == 75 || edge == 222 || edge == 74 || edge == 88 || edge == 219 || edge == 95 || edge == 218 || edge == 94 || edge == 91 || edge == 90) {
|
||||
if(tx.x - crop[0] < h - tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(!draw) discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh
Normal file
18
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.yy
Normal file
10
shaders/sh_mk_tile55_edge_b/sh_mk_tile55_edge_b.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile55_edge_b",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
46
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh
Normal file
46
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.fsh
Normal file
|
@ -0,0 +1,46 @@
|
|||
//////////////// 55 Tile Left ////////////////
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 208 || edge == 64 || edge == 80) {
|
||||
if(tx.x > tx.y) discard;
|
||||
|
||||
} else if(edge == 148 || edge == 66 || edge == 86 || edge == 210 || edge == 82) {
|
||||
|
||||
} else if(edge == 22 || edge == 2 || edge == 18) {
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else if(edge == 16 || edge == 0) {
|
||||
if(tx.x > tx.y) discard;
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else {
|
||||
bool draw = false;
|
||||
|
||||
if(edge == 216 || edge == 72 || edge == 223 || edge == 75 || edge == 222 || edge == 74 || edge == 95 || edge == 88 || edge == 219 || edge == 218 || edge == 94 || edge == 91 || edge == 90) {
|
||||
if(tx.x - crop[0] >= h - tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(edge == 254 || edge == 106 || edge == 30 || edge == 10 || edge == 222 || edge == 74 || edge == 126 || edge == 250 || edge == 218 || edge == 122 || edge == 26 || edge == 94 || edge == 90) {
|
||||
if(tx.x - crop[0] > tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(!draw) discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh
Normal file
18
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.yy
Normal file
10
shaders/sh_mk_tile55_edge_l/sh_mk_tile55_edge_l.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile55_edge_l",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
46
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh
Normal file
46
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.fsh
Normal file
|
@ -0,0 +1,46 @@
|
|||
//////////////// 55 Tile Right ////////////////
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 104 || edge == 64 || edge == 72) {
|
||||
if(tx.x < h - tx.y) discard;
|
||||
|
||||
} else if(edge == 41 || edge == 66 || edge == 75 || edge == 106 || edge == 74) {
|
||||
|
||||
} else if(edge == 11 || edge == 2 || edge == 10) {
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else if(edge == 8 || edge == 0) {
|
||||
if(tx.x < h - tx.y) discard;
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else {
|
||||
bool draw = false;
|
||||
|
||||
if(edge == 80 || edge == 120 || edge == 86 || edge == 127 || edge == 82 || edge == 123 || edge == 88 || edge == 95 || edge == 126 || edge == 122 || edge == 94 || edge == 91 || edge == 90) {
|
||||
if(tx.x - crop[0] <= tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(edge == 210 || edge == 251 || edge == 18 || edge == 27 || edge == 82 || edge == 123 || edge == 219 || edge == 250 || edge == 218 || edge == 122 || edge == 26 || edge == 91 || edge == 90) {
|
||||
if(tx.x - crop[0] < h - tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(!draw) discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh
Normal file
18
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy
Normal file
10
shaders/sh_mk_tile55_edge_r/sh_mk_tile55_edge_r.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile55_edge_r",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
46
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh
Normal file
46
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.fsh
Normal file
|
@ -0,0 +1,46 @@
|
|||
//////////////// 55 Tile Top ////////////////
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform vec2 dimension;
|
||||
uniform vec4 crop;
|
||||
uniform int edge;
|
||||
|
||||
void main() {
|
||||
float w = dimension.x;
|
||||
float h = dimension.y;
|
||||
|
||||
vec2 tx = v_vTexcoord * dimension;
|
||||
gl_FragColor = vec4(0.);
|
||||
|
||||
if(edge == 208 || edge == 16 || edge == 80) {
|
||||
if(tx.x < tx.y) discard;
|
||||
|
||||
} else if(edge == 224 || edge == 24 || edge == 120 || edge == 216 || edge == 88) {
|
||||
|
||||
} else if(edge == 104 || edge == 8 || edge == 72) {
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else if(edge == 64 || edge == 0) {
|
||||
if(tx.x < tx.y) discard;
|
||||
if(tx.x > h - tx.y) discard;
|
||||
|
||||
} else {
|
||||
bool draw = false;
|
||||
|
||||
if(edge == 210 || edge == 251 || edge == 18 || edge == 27 || edge == 82 || edge == 123 || edge == 219 || edge == 250 || edge == 218 || edge == 122 || edge == 26 || edge == 91 || edge == 90) {
|
||||
if(tx.x - crop[2] >= h - tx.y - crop[3])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(edge == 254 || edge == 106 || edge == 30 || edge == 10 || edge == 222 || edge == 74 || edge == 126 || edge == 250 || edge == 218 || edge == 122 || edge == 26 || edge == 94 || edge == 90) {
|
||||
if(tx.x + crop[0] <= tx.y + crop[1])
|
||||
draw = true;
|
||||
}
|
||||
|
||||
if(!draw) discard;
|
||||
}
|
||||
|
||||
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||
}
|
18
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh
Normal file
18
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.vsh
Normal file
|
@ -0,0 +1,18 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main() {
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.yy
Normal file
10
shaders/sh_mk_tile55_edge_t/sh_mk_tile55_edge_t.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_mk_tile55_edge_t",
|
||||
"parent": {
|
||||
"name": "Tile",
|
||||
"path": "folders/shader/MK effects/Tile.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
Loading…
Reference in a new issue