diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 583297d6b..3d8005e20 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -215,14 +215,18 @@ {"name":"2d effect","order":14,"path":"folders/shader/3d/2d effect.yy",}, {"name":"legacy","order":13,"path":"folders/shader/3d/legacy.yy",}, {"name":"ssao","order":24,"path":"folders/shader/3d/ssao.yy",}, - {"name":"blur","order":6,"path":"folders/shader/blur.yy",}, - {"name":"channels","order":9,"path":"folders/shader/channels.yy",}, {"name":"color picker","order":19,"path":"folders/shader/color picker.yy",}, {"name":"color selector","order":14,"path":"folders/shader/color selector.yy",}, {"name":"draw","order":7,"path":"folders/shader/draw.yy",}, {"name":"filter","order":4,"path":"folders/shader/filter.yy",}, - {"name":"color","order":53,"path":"folders/shader/filter/color.yy",}, - {"name":"shadow caster","order":46,"path":"folders/shader/filter/shadow caster.yy",}, + {"name":"blur","order":41,"path":"folders/shader/filter/blur.yy",}, + {"name":"channels","order":40,"path":"folders/shader/filter/channels.yy",}, + {"name":"color","order":34,"path":"folders/shader/filter/color.yy",}, + {"name":"morph","order":42,"path":"folders/shader/filter/morph.yy",}, + {"name":"shadow caster","order":27,"path":"folders/shader/filter/shadow caster.yy",}, + {"name":"shape seperator","order":39,"path":"folders/shader/filter/shape seperator.yy",}, + {"name":"surface replace","order":43,"path":"folders/shader/filter/surface replace.yy",}, + {"name":"warp","order":44,"path":"folders/shader/filter/warp.yy",}, {"name":"flood fill","order":11,"path":"folders/shader/flood fill.yy",}, {"name":"generator","order":1,"path":"folders/shader/generator.yy",}, {"name":"blinker","order":12,"path":"folders/shader/generator/blinker.yy",}, @@ -240,17 +244,13 @@ {"name":"MK effects","order":22,"path":"folders/shader/MK effects.yy",}, {"name":"Flag","order":9,"path":"folders/shader/MK effects/Flag.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",}, {"name":"simulation","order":24,"path":"folders/shader/simulation.yy",}, {"name":"diffuse","order":3,"path":"folders/shader/simulation/diffuse.yy",}, {"name":"fluid","order":1,"path":"folders/shader/simulation/fluid.yy",}, {"name":"sprites","order":2,"path":"folders/shader/sprites.yy",}, - {"name":"surface replace","order":16,"path":"folders/shader/surface replace.yy",}, {"name":"transition","order":15,"path":"folders/shader/transition.yy",}, {"name":"UI","order":21,"path":"folders/shader/UI.yy",}, - {"name":"warp","order":8,"path":"folders/shader/warp.yy",}, {"name":"sprites","order":11,"path":"folders/sprites.yy",}, {"name":"bs","order":4,"path":"folders/sprites/bs.yy",}, {"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",}, @@ -275,7 +275,7 @@ {"name":"d3d_light_point","order":2,"path":"scripts/d3d_light_point/d3d_light_point.yy",}, {"name":"panel_preview_window","order":1,"path":"scripts/panel_preview_window/panel_preview_window.yy",}, {"name":"node_PCX_equation","order":5,"path":"scripts/node_PCX_equation/node_PCX_equation.yy",}, - {"name":"sh_scale3x","order":29,"path":"shaders/sh_scale3x/sh_scale3x.yy",}, + {"name":"sh_scale3x","order":16,"path":"shaders/sh_scale3x/sh_scale3x.yy",}, {"name":"sh_active_canvas_ink","order":22,"path":"shaders/sh_active_canvas_ink/sh_active_canvas_ink.yy",}, {"name":"__node_3d","order":2,"path":"scripts/__node_3d/__node_3d.yy",}, {"name":"node_csv_file_write","order":12,"path":"scripts/node_csv_file_write/node_csv_file_write.yy",}, @@ -288,7 +288,7 @@ {"name":"s_node_normal","order":30,"path":"sprites/s_node_normal/s_node_normal.yy",}, {"name":"node_pixel_sort","order":12,"path":"scripts/node_pixel_sort/node_pixel_sort.yy",}, {"name":"node_hlsl","order":13,"path":"scripts/node_hlsl/node_hlsl.yy",}, - {"name":"sh_dither","order":28,"path":"shaders/sh_dither/sh_dither.yy",}, + {"name":"sh_dither","order":15,"path":"shaders/sh_dither/sh_dither.yy",}, {"name":"__vec2","order":7,"path":"scripts/__vec2/__vec2.yy",}, {"name":"node_region_fill","order":1,"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",}, @@ -302,6 +302,7 @@ {"name":"__path","order":1,"path":"scripts/__path/__path.yy",}, {"name":"node_3d_point_affector","order":10,"path":"scripts/node_3d_point_affector/node_3d_point_affector.yy",}, {"name":"draw_text_path","order":19,"path":"scripts/draw_text_path/draw_text_path.yy",}, + {"name":"node_path_from_mask","order":14,"path":"scripts/node_path_from_mask/node_path_from_mask.yy",}, {"name":"sh_brush_outline","order":7,"path":"shaders/sh_brush_outline/sh_brush_outline.yy",}, {"name":"s_node_grid_tri_noise","order":22,"path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",}, {"name":"o_dialog_menubox","order":2,"path":"objects/o_dialog_menubox/o_dialog_menubox.yy",}, @@ -338,7 +339,7 @@ {"name":"node_path_blend","order":2,"path":"scripts/node_path_blend/node_path_blend.yy",}, {"name":"rotator_Rotator","order":3,"path":"objects/rotator_Rotator/rotator_Rotator.yy",}, {"name":"node_switch","order":5,"path":"scripts/node_switch/node_switch.yy",}, - {"name":"sh_corner","order":20,"path":"shaders/sh_corner/sh_corner.yy",}, + {"name":"sh_corner","order":11,"path":"shaders/sh_corner/sh_corner.yy",}, {"name":"node_array","order":5,"path":"scripts/node_array/node_array.yy",}, {"name":"discordBridge","order":8,"path":"extensions/discordBridge/discordBridge.yy",}, {"name":"pack_corner","order":3,"path":"scripts/pack_corner/pack_corner.yy",}, @@ -417,7 +418,7 @@ {"name":"__3D","order":8,"path":"scripts/__3D/__3D.yy",}, {"name":"node_vector_cross2D","order":11,"path":"scripts/node_vector_cross2D/node_vector_cross2D.yy",}, {"name":"FirebaseREST_asyncFunction_Firestore","order":4,"path":"scripts/FirebaseREST_asyncFunction_Firestore/FirebaseREST_asyncFunction_Firestore.yy",}, - {"name":"sh_corner_erode","order":48,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",}, + {"name":"sh_corner_erode","order":29,"path":"shaders/sh_corner_erode/sh_corner_erode.yy",}, {"name":"node_outline","order":11,"path":"scripts/node_outline/node_outline.yy",}, {"name":"sh_mesh_generation","order":4,"path":"shaders/sh_mesh_generation/sh_mesh_generation.yy",}, {"name":"math_function","order":7,"path":"scripts/math_function/math_function.yy",}, @@ -432,7 +433,7 @@ {"name":"Room_FirebaseFirestore_Query","order":1,"path":"rooms/Room_FirebaseFirestore_Query/Room_FirebaseFirestore_Query.yy",}, {"name":"node_FLIP_spawner","order":6,"path":"scripts/node_FLIP_spawner/node_FLIP_spawner.yy",}, {"name":"Obj_FirebaseREST_Listener_Once_Firestore","order":4,"path":"objects/Obj_FirebaseREST_Listener_Once_Firestore/Obj_FirebaseREST_Listener_Once_Firestore.yy",}, - {"name":"sh_FXAA","order":52,"path":"shaders/sh_FXAA/sh_FXAA.yy",}, + {"name":"sh_FXAA","order":33,"path":"shaders/sh_FXAA/sh_FXAA.yy",}, {"name":"s_biterator_slider","order":6,"path":"sprites/s_biterator_slider/s_biterator_slider.yy",}, {"name":"libfilesystem","order":12,"path":"extensions/libfilesystem/libfilesystem.yy",}, {"name":"node_gradient_points","order":7,"path":"scripts/node_gradient_points/node_gradient_points.yy",}, @@ -466,7 +467,7 @@ {"name":"sh_cell_noise_edge","order":2,"path":"shaders/sh_cell_noise_edge/sh_cell_noise_edge.yy",}, {"name":"node_pb_fx_strip","order":11,"path":"scripts/node_pb_fx_strip/node_pb_fx_strip.yy",}, {"name":"node_stripe","order":4,"path":"scripts/node_stripe/node_stripe.yy",}, - {"name":"sh_texture_atlas","order":39,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",}, + {"name":"sh_texture_atlas","order":24,"path":"shaders/sh_texture_atlas/sh_texture_atlas.yy",}, {"name":"__vec4","order":9,"path":"scripts/__vec4/__vec4.yy",}, {"name":"GMSSimpleMIDI","order":15,"path":"extensions/GMSSimpleMIDI/GMSSimpleMIDI.yy",}, {"name":"s_node_fluidSim_domain","order":6,"path":"sprites/s_node_fluidSim_domain/s_node_fluidSim_domain.yy",}, @@ -478,9 +479,9 @@ {"name":"sh_d3d_wireframe","order":17,"path":"shaders/sh_d3d_wireframe/sh_d3d_wireframe.yy",}, {"name":"s_biterator_b_grey_short","order":8,"path":"sprites/s_biterator_b_grey_short/s_biterator_b_grey_short.yy",}, {"name":"printer","order":2,"path":"scripts/printer/printer.yy",}, - {"name":"sh_de_stray","order":16,"path":"shaders/sh_de_stray/sh_de_stray.yy",}, + {"name":"sh_de_stray","order":7,"path":"shaders/sh_de_stray/sh_de_stray.yy",}, {"name":"s_node_vfx_osc","order":14,"path":"sprites/s_node_vfx_osc/s_node_vfx_osc.yy",}, - {"name":"sh_chromatic_aberration","order":31,"path":"shaders/sh_chromatic_aberration/sh_chromatic_aberration.yy",}, + {"name":"sh_chromatic_aberration","order":18,"path":"shaders/sh_chromatic_aberration/sh_chromatic_aberration.yy",}, {"name":"fd_rectangle_create_view","order":3,"path":"scripts/fd_rectangle_create_view/fd_rectangle_create_view.yy",}, {"name":"node_fluid_vortex","order":8,"path":"scripts/node_fluid_vortex/node_fluid_vortex.yy",}, {"name":"node_pb_draw_angle","order":7,"path":"scripts/node_pb_draw_angle/node_pb_draw_angle.yy",}, @@ -586,7 +587,7 @@ {"name":"node_armature_pose","order":3,"path":"scripts/node_armature_pose/node_armature_pose.yy",}, {"name":"s_node_pb_draw_diamond","order":29,"path":"sprites/s_node_pb_draw_diamond/s_node_pb_draw_diamond.yy",}, {"name":"node_3d_transform_scene","order":4,"path":"scripts/node_3d_transform_scene/node_3d_transform_scene.yy",}, - {"name":"sh_trail_filler_pass1","order":49,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",}, + {"name":"sh_trail_filler_pass1","order":30,"path":"shaders/sh_trail_filler_pass1/sh_trail_filler_pass1.yy",}, {"name":"s_node_vfx_wind","order":3,"path":"sprites/s_node_vfx_wind/s_node_vfx_wind.yy",}, {"name":"s_node_pb_fx_strip","order":26,"path":"sprites/s_node_pb_fx_strip/s_node_pb_fx_strip.yy",}, {"name":"s_node_rigidSim_global","order":4,"path":"sprites/s_node_rigidSim_global/s_node_rigidSim_global.yy",}, @@ -769,6 +770,7 @@ {"name":"sh_draw_normal","order":5,"path":"shaders/sh_draw_normal/sh_draw_normal.yy",}, {"name":"preview_overlay_rotation","order":1,"path":"scripts/preview_overlay_rotation/preview_overlay_rotation.yy",}, {"name":"node_array_find","order":1,"path":"scripts/node_array_find/node_array_find.yy",}, + {"name":"sh_bevel_highp","order":3,"path":"shaders/sh_bevel_highp/sh_bevel_highp.yy",}, {"name":"node_registry","order":11,"path":"scripts/node_registry/node_registry.yy",}, {"name":"sh_checkerboard","order":3,"path":"shaders/sh_checkerboard/sh_checkerboard.yy",}, {"name":"node_unicode","order":1,"path":"scripts/node_unicode/node_unicode.yy",}, @@ -837,7 +839,7 @@ {"name":"s_node_wiggler","order":2,"path":"sprites/s_node_wiggler/s_node_wiggler.yy",}, {"name":"__pbBox","order":6,"path":"scripts/__pbBox/__pbBox.yy",}, {"name":"s_node_to_text","order":13,"path":"sprites/s_node_to_text/s_node_to_text.yy",}, - {"name":"sh_edge_detect","order":30,"path":"shaders/sh_edge_detect/sh_edge_detect.yy",}, + {"name":"sh_edge_detect","order":17,"path":"shaders/sh_edge_detect/sh_edge_detect.yy",}, {"name":"s_node_area","order":4,"path":"sprites/s_node_area/s_node_area.yy",}, {"name":"type_conversion","order":8,"path":"scripts/type_conversion/type_conversion.yy",}, {"name":"node_keyframe","order":4,"path":"scripts/node_keyframe/node_keyframe.yy",}, @@ -883,7 +885,7 @@ {"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":"sh_scale2x","order":14,"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",}, {"name":"node_palette","order":4,"path":"scripts/node_palette/node_palette.yy",}, @@ -937,6 +939,7 @@ {"name":"s_node_grid","order":3,"path":"sprites/s_node_grid/s_node_grid.yy",}, {"name":"s_patreon_supporter","order":4,"path":"sprites/s_patreon_supporter/s_patreon_supporter.yy",}, {"name":"s_node_animation_control","order":31,"path":"sprites/s_node_animation_control/s_node_animation_control.yy",}, + {"name":"sh_image_trace","order":45,"path":"shaders/sh_image_trace/sh_image_trace.yy",}, {"name":"node_perlin","order":8,"path":"scripts/node_perlin/node_perlin.yy",}, {"name":"node_blur_simple","order":4,"path":"scripts/node_blur_simple/node_blur_simple.yy",}, {"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",}, @@ -952,12 +955,12 @@ {"name":"sh_fd_visualize_thick_smoke_glsl","order":17,"path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",}, {"name":"s_node_regex_match","order":12,"path":"sprites/s_node_regex_match/s_node_regex_match.yy",}, {"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",}, - {"name":"sh_pixel_sort","order":36,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",}, + {"name":"sh_pixel_sort","order":22,"path":"shaders/sh_pixel_sort/sh_pixel_sort.yy",}, {"name":"node_pb_draw_fill","order":3,"path":"scripts/node_pb_draw_fill/node_pb_draw_fill.yy",}, {"name":"s_node_vfx_destroy","order":7,"path":"sprites/s_node_vfx_destroy/s_node_vfx_destroy.yy",}, {"name":"fd_rectangle_set_material_size","order":7,"path":"scripts/fd_rectangle_set_material_size/fd_rectangle_set_material_size.yy",}, {"name":"fd_rectangle_shift_content","order":19,"path":"scripts/fd_rectangle_shift_content/fd_rectangle_shift_content.yy",}, - {"name":"sh_texture_remap","order":24,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",}, + {"name":"sh_texture_remap","order":12,"path":"shaders/sh_texture_remap/sh_texture_remap.yy",}, {"name":"node_application_in","order":20,"path":"scripts/node_application_in/node_application_in.yy",}, {"name":"FLIP_Domain","order":4,"path":"objects/FLIP_Domain/FLIP_Domain.yy",}, {"name":"obj_fd_rectangle","order":1,"path":"objects/obj_fd_rectangle/obj_fd_rectangle.yy",}, @@ -994,18 +997,18 @@ {"name":"node_pb_fx_add","order":6,"path":"scripts/node_pb_fx_add/node_pb_fx_add.yy",}, {"name":"s_node_csv_file_write","order":8,"path":"sprites/s_node_csv_file_write/s_node_csv_file_write.yy",}, {"name":"s_node_csv_parse","order":15,"path":"sprites/s_node_csv_parse/s_node_csv_parse.yy",}, - {"name":"sh_glow","order":34,"path":"shaders/sh_glow/sh_glow.yy",}, - {"name":"sh_clean_shape","order":37,"path":"shaders/sh_clean_shape/sh_clean_shape.yy",}, + {"name":"sh_glow","order":20,"path":"shaders/sh_glow/sh_glow.yy",}, + {"name":"sh_clean_shape","order":23,"path":"shaders/sh_clean_shape/sh_clean_shape.yy",}, {"name":"fd_rectangle_update","order":20,"path":"scripts/fd_rectangle_update/fd_rectangle_update.yy",}, {"name":"node_rigid_render_output","order":10,"path":"scripts/node_rigid_render_output/node_rigid_render_output.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_options_value_path","order":12,"path":"objects/Obj_FirebaseFirestore_Collection_Query_options_value_path/Obj_FirebaseFirestore_Collection_Query_options_value_path.yy",}, - {"name":"sh_posterize","order":19,"path":"shaders/sh_posterize/sh_posterize.yy",}, + {"name":"sh_posterize","order":10,"path":"shaders/sh_posterize/sh_posterize.yy",}, {"name":"s_node_mirror","order":3,"path":"sprites/s_node_mirror/s_node_mirror.yy",}, {"name":"s_node_stagger","order":6,"path":"sprites/s_node_stagger/s_node_stagger.yy",}, {"name":"s_node_blur_simple","order":43,"path":"sprites/s_node_blur_simple/s_node_blur_simple.yy",}, {"name":"theme_definition","order":14,"path":"scripts/theme_definition/theme_definition.yy",}, {"name":"project_data","order":17,"path":"scripts/project_data/project_data.yy",}, - {"name":"sh_vignette","order":57,"path":"shaders/sh_vignette/sh_vignette.yy",}, + {"name":"sh_vignette","order":38,"path":"shaders/sh_vignette/sh_vignette.yy",}, {"name":"s_patreon_banner","order":3,"path":"sprites/s_patreon_banner/s_patreon_banner.yy",}, {"name":"_draw_defines","order":15,"path":"scripts/_draw_defines/_draw_defines.yy",}, {"name":"sh_color_replace","order":8,"path":"shaders/sh_color_replace/sh_color_replace.yy",}, @@ -1065,6 +1068,7 @@ {"name":"node_pb_box_contract","order":8,"path":"scripts/node_pb_box_contract/node_pb_box_contract.yy",}, {"name":"ac_ripple","order":1,"path":"animcurves/ac_ripple/ac_ripple.yy",}, {"name":"histogram_drawer","order":2,"path":"scripts/histogram_drawer/histogram_drawer.yy",}, + {"name":"preview_overlay_gradient_range","order":5,"path":"scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.yy",}, {"name":"sh_color_picker_side_value","order":3,"path":"shaders/sh_color_picker_side_value/sh_color_picker_side_value.yy",}, {"name":"node_array_range","order":9,"path":"scripts/node_array_range/node_array_range.yy",}, {"name":"node_animation_control","order":11,"path":"scripts/node_animation_control/node_animation_control.yy",}, @@ -1144,7 +1148,7 @@ {"name":"s_node_noise_fbm","order":26,"path":"sprites/s_node_noise_fbm/s_node_noise_fbm.yy",}, {"name":"sh_color_select_content","order":1,"path":"shaders/sh_color_select_content/sh_color_select_content.yy",}, {"name":"s_node_hlsl","order":32,"path":"sprites/s_node_hlsl/s_node_hlsl.yy",}, - {"name":"sh_outline","order":18,"path":"shaders/sh_outline/sh_outline.yy",}, + {"name":"sh_outline","order":9,"path":"shaders/sh_outline/sh_outline.yy",}, {"name":"s_node_strandSim_break","order":8,"path":"sprites/s_node_strandSim_break/s_node_strandSim_break.yy",}, {"name":"s_node_scatter_point","order":4,"path":"sprites/s_node_scatter_point/s_node_scatter_point.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_NotEqual","order":9,"path":"objects/Obj_FirebaseFirestore_Collection_Query_NotEqual/Obj_FirebaseFirestore_Collection_Query_NotEqual.yy",}, @@ -1170,7 +1174,7 @@ {"name":"node_rigid_render","order":3,"path":"scripts/node_rigid_render/node_rigid_render.yy",}, {"name":"node_image_splice_sheet","order":4,"path":"scripts/node_image_splice_sheet/node_image_splice_sheet.yy",}, {"name":"node_VFX_renderer_output","order":8,"path":"scripts/node_VFX_renderer_output/node_VFX_renderer_output.yy",}, - {"name":"sh_posterize_palette","order":12,"path":"shaders/sh_posterize_palette/sh_posterize_palette.yy",}, + {"name":"sh_posterize_palette","order":5,"path":"shaders/sh_posterize_palette/sh_posterize_palette.yy",}, {"name":"fd_rectangle_set_material_maccormack_weight","order":6,"path":"scripts/fd_rectangle_set_material_maccormack_weight/fd_rectangle_set_material_maccormack_weight.yy",}, {"name":"collection_data","order":9,"path":"scripts/collection_data/collection_data.yy",}, {"name":"s_node_flood_fill","order":24,"path":"sprites/s_node_flood_fill/s_node_flood_fill.yy",}, @@ -1266,7 +1270,7 @@ {"name":"__node_3d_mesh","order":1,"path":"scripts/__node_3d_mesh/__node_3d_mesh.yy",}, {"name":"d3d_surface_extrude","order":7,"path":"scripts/d3d_surface_extrude/d3d_surface_extrude.yy",}, {"name":"node_mesh_to_path","order":3,"path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",}, - {"name":"sh_convolution","order":44,"path":"shaders/sh_convolution/sh_convolution.yy",}, + {"name":"sh_convolution","order":25,"path":"shaders/sh_convolution/sh_convolution.yy",}, {"name":"FirebaseREST_HTTP_Failed_Firestore","order":18,"path":"scripts/FirebaseREST_HTTP_Failed_Firestore/FirebaseREST_HTTP_Failed_Firestore.yy",}, {"name":"number_function","order":14,"path":"scripts/number_function/number_function.yy",}, {"name":"s_node_array_shift","order":12,"path":"sprites/s_node_array_shift/s_node_array_shift.yy",}, @@ -1274,6 +1278,7 @@ {"name":"s_node_active_canvas","order":22,"path":"sprites/s_node_active_canvas/s_node_active_canvas.yy",}, {"name":"s_node_cache_array","order":25,"path":"sprites/s_node_cache_array/s_node_cache_array.yy",}, {"name":"sh_blend_alpha_addition","order":13,"path":"shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.yy",}, + {"name":"s_node_path_from_mask","order":14,"path":"sprites/s_node_path_from_mask/s_node_path_from_mask.yy",}, {"name":"widget","order":25,"path":"scripts/widget/widget.yy",}, {"name":"node_VFX_effect_vortex","order":6,"path":"scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy",}, {"name":"s_node_skew","order":11,"path":"sprites/s_node_skew/s_node_skew.yy",}, @@ -1285,7 +1290,7 @@ {"name":"s_node_noise","order":8,"path":"sprites/s_node_noise/s_node_noise.yy",}, {"name":"s_node_pb_box_transform","order":19,"path":"sprites/s_node_pb_box_transform/s_node_pb_box_transform.yy",}, {"name":"node_string_path_separate_folder","order":12,"path":"scripts/node_string_path_separate_folder/node_string_path_separate_folder.yy",}, - {"name":"sh_erode","order":17,"path":"shaders/sh_erode/sh_erode.yy",}, + {"name":"sh_erode","order":8,"path":"shaders/sh_erode/sh_erode.yy",}, {"name":"fd_rectangle_get_velocity_dissipation_value","order":21,"path":"scripts/fd_rectangle_get_velocity_dissipation_value/fd_rectangle_get_velocity_dissipation_value.yy",}, {"name":"node_pixel_cloud","order":6,"path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",}, {"name":"s_node_crop_content","order":13,"path":"sprites/s_node_crop_content/s_node_crop_content.yy",}, @@ -1340,7 +1345,7 @@ {"name":"fd_rectangle_get_velocity_width","order":26,"path":"scripts/fd_rectangle_get_velocity_width/fd_rectangle_get_velocity_width.yy",}, {"name":"node_convolution","order":4,"path":"scripts/node_convolution/node_convolution.yy",}, {"name":"node_pb_draw_ellipse","order":2,"path":"scripts/node_pb_draw_ellipse/node_pb_draw_ellipse.yy",}, - {"name":"sh_outline_only","order":35,"path":"shaders/sh_outline_only/sh_outline_only.yy",}, + {"name":"sh_outline_only","order":21,"path":"shaders/sh_outline_only/sh_outline_only.yy",}, {"name":"node_mk_saber","order":3,"path":"scripts/node_mk_saber/node_mk_saber.yy",}, {"name":"lcd_function","order":13,"path":"scripts/lcd_function/lcd_function.yy",}, {"name":"sh_draw_divide","order":12,"path":"shaders/sh_draw_divide/sh_draw_divide.yy",}, @@ -1444,7 +1449,7 @@ {"name":"panel_preview_onion_setting","order":7,"path":"scripts/panel_preview_onion_setting/panel_preview_onion_setting.yy",}, {"name":"FirebaseFirestorePaths","order":2,"path":"scripts/FirebaseFirestorePaths/FirebaseFirestorePaths.yy",}, {"name":"d3d_cylinder","order":2,"path":"scripts/d3d_cylinder/d3d_cylinder.yy",}, - {"name":"sh_palette_replace","order":45,"path":"shaders/sh_palette_replace/sh_palette_replace.yy",}, + {"name":"sh_palette_replace","order":26,"path":"shaders/sh_palette_replace/sh_palette_replace.yy",}, {"name":"sh_cell_noise_random","order":3,"path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",}, {"name":"node_iterator_input","order":1,"path":"scripts/node_iterator_input/node_iterator_input.yy",}, {"name":"s_node_atlas","order":5,"path":"sprites/s_node_atlas/s_node_atlas.yy",}, @@ -1464,7 +1469,7 @@ {"name":"fd_rectangle_set_collision_mask_surface","order":2,"path":"scripts/fd_rectangle_set_collision_mask_surface/fd_rectangle_set_collision_mask_surface.yy",}, {"name":"node_array_length","order":8,"path":"scripts/node_array_length/node_array_length.yy",}, {"name":"node_erode","order":9,"path":"scripts/node_erode/node_erode.yy",}, - {"name":"sh_colours_replace","order":54,"path":"shaders/sh_colours_replace/sh_colours_replace.yy",}, + {"name":"sh_colours_replace","order":35,"path":"shaders/sh_colours_replace/sh_colours_replace.yy",}, {"name":"sh_channel_R2G","order":11,"path":"shaders/sh_channel_R2G/sh_channel_R2G.yy",}, {"name":"node_wrap_mesh","order":6,"path":"scripts/node_wrap_mesh/node_wrap_mesh.yy",}, {"name":"sh_offset","order":12,"path":"shaders/sh_offset/sh_offset.yy",}, @@ -1495,7 +1500,7 @@ {"name":"s_node_armature_bind","order":14,"path":"sprites/s_node_armature_bind/s_node_armature_bind.yy",}, {"name":"node_monitor_capture","order":21,"path":"scripts/node_monitor_capture/node_monitor_capture.yy",}, {"name":"node_blur_contrast","order":1,"path":"scripts/node_blur_contrast/node_blur_contrast.yy",}, - {"name":"sh_trail_filler","order":50,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",}, + {"name":"sh_trail_filler","order":31,"path":"shaders/sh_trail_filler/sh_trail_filler.yy",}, {"name":"s_node_border","order":12,"path":"sprites/s_node_border/s_node_border.yy",}, {"name":"__vector","order":10,"path":"scripts/__vector/__vector.yy",}, {"name":"s_node_pin","order":2,"path":"sprites/s_node_pin/s_node_pin.yy",}, @@ -1505,7 +1510,7 @@ {"name":"node_string_regex_search","order":8,"path":"scripts/node_string_regex_search/node_string_regex_search.yy",}, {"name":"s_node_text_render","order":17,"path":"sprites/s_node_text_render/s_node_text_render.yy",}, {"name":"__init_global","order":8,"path":"scripts/__init_global/__init_global.yy",}, - {"name":"sh_trail_filler_pass2","order":51,"path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",}, + {"name":"sh_trail_filler_pass2","order":32,"path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",}, {"name":"node_PCX_array_set","order":1,"path":"scripts/node_PCX_array_set/node_PCX_array_set.yy",}, {"name":"node_caustic","order":23,"path":"scripts/node_caustic/node_caustic.yy",}, {"name":"s_node_regex_search","order":11,"path":"sprites/s_node_regex_search/s_node_regex_search.yy",}, @@ -1657,7 +1662,7 @@ {"name":"s_node_dot_product","order":13,"path":"sprites/s_node_dot_product/s_node_dot_product.yy",}, {"name":"sh_downsample","order":1,"path":"shaders/sh_downsample/sh_downsample.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_Greater","order":4,"path":"objects/Obj_FirebaseFirestore_Collection_Query_Greater/Obj_FirebaseFirestore_Collection_Query_Greater.yy",}, - {"name":"sh_remove_black","order":33,"path":"shaders/sh_remove_black/sh_remove_black.yy",}, + {"name":"sh_remove_black","order":19,"path":"shaders/sh_remove_black/sh_remove_black.yy",}, {"name":"path_parser","order":3,"path":"scripts/path_parser/path_parser.yy",}, {"name":"s_node_3d_camera","order":13,"path":"sprites/s_node_3d_camera/s_node_3d_camera.yy",}, {"name":"node_crop_content","order":14,"path":"scripts/node_crop_content/node_crop_content.yy",}, @@ -1818,7 +1823,7 @@ {"name":"node_pb_box_split","order":2,"path":"scripts/node_pb_box_split/node_pb_box_split.yy",}, {"name":"node_feedback_inline","order":3,"path":"scripts/node_feedback_inline/node_feedback_inline.yy",}, {"name":"s_node_output","order":7,"path":"sprites/s_node_output/s_node_output.yy",}, - {"name":"sh_atlas","order":26,"path":"shaders/sh_atlas/sh_atlas.yy",}, + {"name":"sh_atlas","order":13,"path":"shaders/sh_atlas/sh_atlas.yy",}, {"name":"__node_3d_extrude","order":3,"path":"scripts/__node_3d_extrude/__node_3d_extrude.yy",}, {"name":"node_path_array","order":11,"path":"scripts/node_path_array/node_path_array.yy",}, {"name":"node_scale","order":8,"path":"scripts/node_scale/node_scale.yy",}, @@ -1836,7 +1841,7 @@ {"name":"s_node_scale_algo","order":7,"path":"sprites/s_node_scale_algo/s_node_scale_algo.yy",}, {"name":"sh_sdf_dist","order":4,"path":"shaders/sh_sdf_dist/sh_sdf_dist.yy",}, {"name":"node_path_plot","order":12,"path":"scripts/node_path_plot/node_path_plot.yy",}, - {"name":"sh_de_corner","order":15,"path":"shaders/sh_de_corner/sh_de_corner.yy",}, + {"name":"sh_de_corner","order":6,"path":"shaders/sh_de_corner/sh_de_corner.yy",}, {"name":"BBMOD_Vec3","order":5,"path":"scripts/BBMOD_Vec3/BBMOD_Vec3.yy",}, {"name":"node_pythagorean_tile","order":6,"path":"scripts/node_pythagorean_tile/node_pythagorean_tile.yy",}, {"name":"node_rigid_object_spawner","order":6,"path":"scripts/node_rigid_object_spawner/node_rigid_object_spawner.yy",}, @@ -1848,7 +1853,7 @@ {"name":"fd_rectangle_get_material_surface","order":12,"path":"scripts/fd_rectangle_get_material_surface/fd_rectangle_get_material_surface.yy",}, {"name":"s_dialog_bg_l","order":1,"path":"sprites/s_dialog_bg_l/s_dialog_bg_l.yy",}, {"name":"fd_rectangle_clear","order":6,"path":"scripts/fd_rectangle_clear/fd_rectangle_clear.yy",}, - {"name":"sh_tile_random","order":56,"path":"shaders/sh_tile_random/sh_tile_random.yy",}, + {"name":"sh_tile_random","order":37,"path":"shaders/sh_tile_random/sh_tile_random.yy",}, {"name":"d3d_cone","order":5,"path":"scripts/d3d_cone/d3d_cone.yy",}, {"name":"__rectangle","order":7,"path":"scripts/__rectangle/__rectangle.yy",}, {"name":"node_PCX_fn_random","order":1,"path":"scripts/node_PCX_fn_random/node_PCX_fn_random.yy",}, @@ -1907,12 +1912,12 @@ {"name":"node_lerp","order":2,"path":"scripts/node_lerp/node_lerp.yy",}, {"name":"node_3d_instancer","order":3,"path":"scripts/node_3d_instancer/node_3d_instancer.yy",}, {"name":"s_node_pixel_sort","order":42,"path":"sprites/s_node_pixel_sort/s_node_pixel_sort.yy",}, - {"name":"sh_mask_expand","order":55,"path":"shaders/sh_mask_expand/sh_mask_expand.yy",}, + {"name":"sh_mask_expand","order":36,"path":"shaders/sh_mask_expand/sh_mask_expand.yy",}, {"name":"node_texture_remap","order":2,"path":"scripts/node_texture_remap/node_texture_remap.yy",}, {"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","order":14,"path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",}, {"name":"node_ase_layer","order":14,"path":"scripts/node_ase_layer/node_ase_layer.yy",}, {"name":"Obj_FirebaseFirestore_Collection_Query_Equal","order":3,"path":"objects/Obj_FirebaseFirestore_Collection_Query_Equal/Obj_FirebaseFirestore_Collection_Query_Equal.yy",}, - {"name":"sh_local_analyze","order":47,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",}, + {"name":"sh_local_analyze","order":28,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",}, {"name":"s_node_array_zip","order":13,"path":"sprites/s_node_array_zip/s_node_array_zip.yy",}, {"name":"fd_rectangle_get_material_width","order":15,"path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",}, {"name":"FirebaseREST_Firestore_collection_query_decode","order":7,"path":"scripts/FirebaseREST_Firestore_collection_query_decode/FirebaseREST_Firestore_collection_query_decode.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index b85d444ff..2c6a438e0 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -247,14 +247,18 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"legacy","folderPath":"folders/shader/3d/legacy.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"ssao","folderPath":"folders/shader/3d/ssao.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blend","folderPath":"folders/shader/blend.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/shader/blur.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"channels","folderPath":"folders/shader/channels.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color picker","folderPath":"folders/shader/color picker.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color selector","folderPath":"folders/shader/color selector.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"draw","folderPath":"folders/shader/draw.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/shader/filter.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/shader/filter/blur.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"channels","folderPath":"folders/shader/filter/channels.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"color","folderPath":"folders/shader/filter/color.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"morph","folderPath":"folders/shader/filter/morph.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shadow caster","folderPath":"folders/shader/filter/shadow caster.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"shape seperator","folderPath":"folders/shader/filter/shape seperator.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface replace","folderPath":"folders/shader/filter/surface replace.yy",}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warp","folderPath":"folders/shader/filter/warp.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"flood fill","folderPath":"folders/shader/flood fill.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/shader/generator.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blinker","folderPath":"folders/shader/generator/blinker.yy",}, @@ -272,18 +276,14 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"MK effects","folderPath":"folders/shader/MK effects.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"Flag","folderPath":"folders/shader/MK effects/Flag.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",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"simulation","folderPath":"folders/shader/simulation.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"diffuse","folderPath":"folders/shader/simulation/diffuse.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"FLIP","folderPath":"folders/shader/simulation/FLIP.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluid","folderPath":"folders/shader/simulation/fluid.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/shader/sprites.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface replace","folderPath":"folders/shader/surface replace.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"transition","folderPath":"folders/shader/transition.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"UI","folderPath":"folders/shader/UI.yy",}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warp","folderPath":"folders/shader/warp.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"sprites","folderPath":"folders/sprites.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"bs","folderPath":"folders/sprites/bs.yy",}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"gameframe","folderPath":"folders/sprites/gameframe.yy",}, @@ -496,6 +496,7 @@ {"id":{"name":"__path","path":"scripts/__path/__path.yy",},}, {"id":{"name":"node_3d_point_affector","path":"scripts/node_3d_point_affector/node_3d_point_affector.yy",},}, {"id":{"name":"draw_text_path","path":"scripts/draw_text_path/draw_text_path.yy",},}, + {"id":{"name":"node_path_from_mask","path":"scripts/node_path_from_mask/node_path_from_mask.yy",},}, {"id":{"name":"sh_brush_outline","path":"shaders/sh_brush_outline/sh_brush_outline.yy",},}, {"id":{"name":"s_node_grid_tri_noise","path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},}, {"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},}, @@ -1031,6 +1032,7 @@ {"id":{"name":"sh_draw_normal","path":"shaders/sh_draw_normal/sh_draw_normal.yy",},}, {"id":{"name":"preview_overlay_rotation","path":"scripts/preview_overlay_rotation/preview_overlay_rotation.yy",},}, {"id":{"name":"node_array_find","path":"scripts/node_array_find/node_array_find.yy",},}, + {"id":{"name":"sh_bevel_highp","path":"shaders/sh_bevel_highp/sh_bevel_highp.yy",},}, {"id":{"name":"sh_seperate_shape_index","path":"shaders/sh_seperate_shape_index/sh_seperate_shape_index.yy",},}, {"id":{"name":"node_registry","path":"scripts/node_registry/node_registry.yy",},}, {"id":{"name":"sh_checkerboard","path":"shaders/sh_checkerboard/sh_checkerboard.yy",},}, @@ -1224,6 +1226,7 @@ {"id":{"name":"node_trigger","path":"scripts/node_trigger/node_trigger.yy",},}, {"id":{"name":"s_node_animation_control","path":"sprites/s_node_animation_control/s_node_animation_control.yy",},}, {"id":{"name":"node_align_functions","path":"scripts/node_align_functions/node_align_functions.yy",},}, + {"id":{"name":"sh_image_trace","path":"shaders/sh_image_trace/sh_image_trace.yy",},}, {"id":{"name":"node_perlin","path":"scripts/node_perlin/node_perlin.yy",},}, {"id":{"name":"node_blur_simple","path":"scripts/node_blur_simple/node_blur_simple.yy",},}, {"id":{"name":"node_feedback_input","path":"scripts/node_feedback_input/node_feedback_input.yy",},}, @@ -1367,6 +1370,7 @@ {"id":{"name":"node_pb_box_contract","path":"scripts/node_pb_box_contract/node_pb_box_contract.yy",},}, {"id":{"name":"ac_ripple","path":"animcurves/ac_ripple/ac_ripple.yy",},}, {"id":{"name":"histogram_drawer","path":"scripts/histogram_drawer/histogram_drawer.yy",},}, + {"id":{"name":"preview_overlay_gradient_range","path":"scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.yy",},}, {"id":{"name":"node_3d_scene","path":"scripts/node_3d_scene/node_3d_scene.yy",},}, {"id":{"name":"sh_color_picker_side_value","path":"shaders/sh_color_picker_side_value/sh_color_picker_side_value.yy",},}, {"id":{"name":"node_array_range","path":"scripts/node_array_range/node_array_range.yy",},}, @@ -1600,6 +1604,7 @@ {"id":{"name":"s_node_active_canvas","path":"sprites/s_node_active_canvas/s_node_active_canvas.yy",},}, {"id":{"name":"s_node_cache_array","path":"sprites/s_node_cache_array/s_node_cache_array.yy",},}, {"id":{"name":"sh_blend_alpha_addition","path":"shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.yy",},}, + {"id":{"name":"s_node_path_from_mask","path":"sprites/s_node_path_from_mask/s_node_path_from_mask.yy",},}, {"id":{"name":"widget","path":"scripts/widget/widget.yy",},}, {"id":{"name":"node_VFX_effect_vortex","path":"scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy",},}, {"id":{"name":"s_node_skew","path":"sprites/s_node_skew/s_node_skew.yy",},}, diff --git a/fonts/_f_sdf/_f_sdf.old.png b/fonts/_f_sdf/_f_sdf.old.png index 4de5fb708..d1404809a 100644 Binary files a/fonts/_f_sdf/_f_sdf.old.png and b/fonts/_f_sdf/_f_sdf.old.png differ diff --git a/fonts/_f_sdf/_f_sdf.png b/fonts/_f_sdf/_f_sdf.png index 8937f9aba..84a5a9db5 100644 Binary files a/fonts/_f_sdf/_f_sdf.png and b/fonts/_f_sdf/_f_sdf.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.old.png b/fonts/_f_sdf_medium/_f_sdf_medium.old.png index 062bc81be..1df097eef 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.old.png and b/fonts/_f_sdf_medium/_f_sdf_medium.old.png differ diff --git a/fonts/_f_sdf_medium/_f_sdf_medium.png b/fonts/_f_sdf_medium/_f_sdf_medium.png index 3bf9ce050..260587b93 100644 Binary files a/fonts/_f_sdf_medium/_f_sdf_medium.png and b/fonts/_f_sdf_medium/_f_sdf_medium.png differ diff --git a/scripts/__path/__path.gml b/scripts/__path/__path.gml index 18824dfc5..4e4053481 100644 --- a/scripts/__path/__path.gml +++ b/scripts/__path/__path.gml @@ -12,9 +12,14 @@ function Path() constructor { static getLineCount = function() { return 1; } static getTangentRatio = function(_rat) { return 0; } - static getPointDistance = function(_seg) { return new __vec2(0, 0); } - static getPointSegment = function(_seg) { return new __vec2(0, 0); } - static getPointRatio = function(_rat) { return new __vec2(0, 0); } + + static getPointDistance = function(_seg, _ind = 0, out = undefined) { return new __vec2(0, 0); } + static getPointRatio = function(_rat, _ind = 0, out = undefined) { + var pix = frac(_rat) * lengthTotal; + return getPointDistance(pix, _ind, out); + } + + static getPointSegment = function(_seg, _ind = 0, out = undefined) { return new __vec2(0, 0); } } function PathSegment() : Path() constructor { diff --git a/scripts/buffer_functions/buffer_functions.gml b/scripts/buffer_functions/buffer_functions.gml index fcf3f7c6b..b77016a32 100644 --- a/scripts/buffer_functions/buffer_functions.gml +++ b/scripts/buffer_functions/buffer_functions.gml @@ -76,3 +76,16 @@ function buffer_deserialize(buffer, compress = true) { #region return buffer_decompress(buff); } #endregion +function buffer_getPixel(buffer, _w, _h, _x, _y) { #region + if(_x < 0 || _y < 0 || _x >= _w || _y >= _h) return 0; + + buffer_seek(buffer, buffer_seek_start, (_w * _y + _x) * 4); + return buffer_read(buffer, buffer_u32); +} #endregion + +function buffer_setPixel(buffer, _w, _h, _x, _y, _c) { #region + if(_x < 0 || _y < 0 || _x >= _w || _y >= _h) return 0; + + buffer_seek(buffer, buffer_seek_start, (_w * _y + _x) * 4); + buffer_write(buffer, buffer_u32, _c); +} #endregion \ No newline at end of file diff --git a/scripts/buttonGradient/buttonGradient.gml b/scripts/buttonGradient/buttonGradient.gml index a08914fe6..61b669bf4 100644 --- a/scripts/buttonGradient/buttonGradient.gml +++ b/scripts/buttonGradient/buttonGradient.gml @@ -1,8 +1,9 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor { - onApply = _onApply; + onApply = _onApply; parentDialog = dialog; current_gradient = noone; + side_button = noone; function apply(value) { if(!interactable) return; @@ -28,6 +29,12 @@ function buttonGradient(_onApply, dialog = noone) : widget() constructor { y = _y; w = _w; + if(side_button && instanceof(side_button) == "buttonClass") { + side_button.setFocusHover(active, hover); + side_button.draw(_x + _w - ui(32), _y + _h / 2 - ui(32 / 2), ui(32), ui(32), _m, THEME.button_hide); + _w -= ui(40); + } + var _gw = _w - ui(8); var _gh = _h - ui(8); diff --git a/scripts/gradients_function/gradients_function.gml b/scripts/gradients_function/gradients_function.gml index fd14aee35..815f4df86 100644 --- a/scripts/gradients_function/gradients_function.gml +++ b/scripts/gradients_function/gradients_function.gml @@ -280,6 +280,33 @@ function loadGradient(path) { #region return grad; } #endregion +function shader_set_gradient(gradient, surface, range, junc) { #region + var use_map = junc.attributes.mapped && is_surface(surface); + + shader_set_i("gradient_use_map", use_map); + shader_set_f("gradient_map_range", range); + var t = shader_set_surface("gradient_map", surface); + gpu_set_tex_filter_ext(t, true); + + gradient.shader_submit(); +} #endregion + +function evaluate_gradient_map(_x, gradient, surface, range, junc) { #region + var use_map = junc.attributes.mapped && is_surface(surface); + + if(use_map) { + var _sw = surface_get_width(surface); + var _sh = surface_get_width(surface); + + var _sx = lerp(range[0], range[2], _x) * _sw; + var _sy = lerp(range[1], range[3], _x) * _sh; + + return surface_getpixel_ext(surface, _sx, _sy); + } + + return gradient.eval(_x); +} #endregion + globalvar GRADIENTS; GRADIENTS = []; diff --git a/scripts/node_bevel/node_bevel.gml b/scripts/node_bevel/node_bevel.gml index 315874c87..edb73dd92 100644 --- a/scripts/node_bevel/node_bevel.gml +++ b/scripts/node_bevel/node_bevel.gml @@ -69,9 +69,10 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _sca = _data[3]; var _slp = _data[4]; var _sam = struct_try_get(attributes, "oversample"); + var _dim = surface_get_dimension(_data[0]); - surface_set_shader(_outSurf, sh_bevel); - shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); + surface_set_shader(_outSurf, max(_dim[0], _dim[1]) < 256? sh_bevel : sh_bevel_highp); + shader_set_f("dimension", _dim); shader_set_f_map("height", _hei, _data[11], inputs[| 1]); shader_set_f("shift", _shf); shader_set_f("scale", _sca); diff --git a/scripts/node_colorize/node_colorize.gml b/scripts/node_colorize/node_colorize.gml index 5cb117bb6..6263271e9 100644 --- a/scripts/node_colorize/node_colorize.gml +++ b/scripts/node_colorize/node_colorize.gml @@ -3,7 +3,8 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ); + inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + .setMappable(11); inputs[| 2] = nodeValue("Gradient shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) .setDisplay(VALUE_DISPLAY.slider, { range: [ -1, 1, .01 ] }) @@ -28,28 +29,35 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 10] = nodeValueMap("Gradient shift map", self); + inputs[| 11] = nodeValueMap("Gradient map", self); + + inputs[| 12] = nodeValueGradientRange("Gradient map range", self, inputs[| 1]); + ////////////////////////////////////////////////////////////////////////////////////////////////// input_display_list = [ 5, 7, ["Surfaces", true], 0, 3, 4, 8, 9, - ["Colorize", false], 1, 2, 10, 6, - ] + ["Colorize", false], 1, 11, 2, 10, 6, + ]; outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); attribute_surface_depth(); + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + inputs[| 12].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, surface_get_dimension(getSingleValue(0))); + } #endregion + static step = function() { #region __step_mask_modifier(); + inputs[| 1].mappableStep(); inputs[| 2].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { #region - var _gra = _data[1]; - surface_set_shader(_outSurf, sh_colorize); - _gra.shader_submit(); + shader_set_gradient(_data[1], _data[11], _data[12], inputs[| 1]); shader_set_f_map("gradient_shift", _data[2], _data[10], inputs[| 2]); shader_set_i("multiply_alpha", _data[6]); diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index 2744bf492..cdcb94fbf 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -338,7 +338,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x var _hi = ui(junction_draw_pad_y); var _ho = ui(junction_draw_pad_y); - var _prev_surf = previewable && preview_draw && (preview_channel < ds_list_size(outputs) && outputs[| preview_channel].type == VALUE_TYPE.surface); + var _prev_surf = previewable && preview_draw && is_surface(getGraphPreviewSurface()); for( var i = 0; i < ds_list_size(inputs); i++ ) { var _inp = inputs[| i]; diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index 8f7aabbd2..7fda78173 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -4,7 +4,8 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF ) .setDisplay(VALUE_DISPLAY.vector); - inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ); + inputs[| 1] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject([ c_black, c_white ]) ) + .setMappable(15); inputs[| 2] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Linear", "Circular", "Radial" ]); @@ -24,7 +25,8 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.vector) .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); - inputs[| 7] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + inputs[| 7] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + .setDisplay(VALUE_DISPLAY.enum_button, [ "None", "Loop", "Pingpong" ]); inputs[| 8] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); @@ -46,18 +48,27 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 14] = nodeValue("Uniform ratio", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 15] = nodeValueMap("Gradient map", self); + + inputs[| 16] = nodeValueGradientRange("Gradient map range", self, inputs[| 1]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ ["Output", true], 0, 8, - ["Gradient", false], 1, 5, 12, 9, 13, 7, + ["Gradient", false], 1, 15, 5, 12, 9, 13, 7, ["Shape", false], 2, 3, 10, 4, 11, 6, 14, ]; attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region - inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 6].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 16].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } #endregion static step = function() { #region @@ -67,6 +78,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 4].setVisible(_typ == 1); inputs[| 14].setVisible(_typ); + inputs[| 1].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); inputs[| 5].mappableStep(); @@ -75,7 +87,6 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) static processData = function(_outSurf, _data, _output_index, _array_index) { var _dim = _data[0]; - var _gra = _data[1]; var _typ = _data[2]; var _cnt = _data[6]; var _lop = _data[7]; @@ -85,7 +96,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); surface_set_shader(_outSurf, sh_gradient); - _gra.shader_submit(); + shader_set_gradient(_data[1], _data[15], _data[16], inputs[| 1]); shader_set_f("dimension", _dim); diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 6e6027469..67301b267 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -20,7 +20,8 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons .setDisplay(VALUE_DISPLAY.rotation) .setMappable(15); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(20); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -59,10 +60,18 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons inputs[| 19] = nodeValue("Truchet threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider) + ////////////////////////////////////////////////////////////////////////////////// + + inputs[| 20] = nodeValueMap("Gradient map", self); + + inputs[| 21] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 4, 15, 2, 13, 3, 14, 9, 8, 16, - ["Render", false], 10, 11, 5, 6, 7, 12, + ["Render", false], 10, 11, 5, 20, 6, 7, 12, ["Truchet", true, 17], 18, 19, ]; @@ -71,13 +80,15 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 21].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); inputs[| 8].mappableStep(); } #endregion @@ -88,7 +99,6 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons var _mode = _data[10]; var _col_gap = _data[6]; - var _gra = _data[5]; inputs[| 5].setVisible(_mode == 0); inputs[| 6].setVisible(_mode != 1); @@ -113,7 +123,7 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons shader_set_f("truchetThres", _data[19]); shader_set_color("gapCol", _col_gap); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[20], _data[21], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_grid_hex/node_grid_hex.gml b/scripts/node_grid_hex/node_grid_hex.gml index 6b169807e..95451a827 100644 --- a/scripts/node_grid_hex/node_grid_hex.gml +++ b/scripts/node_grid_hex/node_grid_hex.gml @@ -20,7 +20,8 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -50,10 +51,18 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 16] = nodeValue("Truchet threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider) + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 17] = nodeValueMap("Gradient map", self); + + inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 3, 12, 2, 11, 4, 13, - ["Render", false], 7, 8, 5, 6, 9, 10, + ["Render", false], 7, 8, 5, 17, 6, 9, 10, ["Truchet", true, 14], 15, 16, ]; @@ -62,13 +71,15 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -78,7 +89,6 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _mode = _data[7]; var _col_gap = _data[6]; - var _gra = _data[5]; inputs[| 5].setVisible(_mode == 0); inputs[| 6].setVisible(_mode != 1); @@ -103,7 +113,7 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("truchetSeed", _data[15]); shader_set_f("truchetThres", _data[16]); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_grid_tri/node_grid_tri.gml b/scripts/node_grid_tri/node_grid_tri.gml index 68d5a9813..dc84ca88d 100644 --- a/scripts/node_grid_tri/node_grid_tri.gml +++ b/scripts/node_grid_tri/node_grid_tri.gml @@ -20,7 +20,8 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) .setDisplay(VALUE_DISPLAY.rotation) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -50,10 +51,18 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 16] = nodeValue("Truchet threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider) + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 17] = nodeValueMap("Gradient map", self); + + inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 4, 13, 2, 11, 3, 12, - ["Render", false], 8, 9, 5, 6, 7, 10, + ["Render", false], 8, 9, 5, 17, 6, 7, 10, ["Truchet", true, 14], 15, 16, ]; @@ -62,13 +71,15 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -80,11 +91,6 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) var _aa = _data[10]; var _col_gap = _data[6]; - var _gra = _data[5]; - - var _grad = _gra.toArray(); - var _grad_color = _grad[0]; - var _grad_time = _grad[1]; inputs[| 5].setVisible(_mode == 0); inputs[| 6].setVisible(_mode != 1); @@ -109,7 +115,7 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) shader_set_f("truchetSeed", _data[15]); shader_set_f("truchetThres", _data[16]); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_herringbone_tile/node_herringbone_tile.gml b/scripts/node_herringbone_tile/node_herringbone_tile.gml index 52885d0be..ce42cbd56 100644 --- a/scripts/node_herringbone_tile/node_herringbone_tile.gml +++ b/scripts/node_herringbone_tile/node_herringbone_tile.gml @@ -20,7 +20,8 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(18); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -52,10 +53,18 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 17] = nodeValue("Tile length", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2); + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 18] = nodeValueMap("Gradient map", self); + + inputs[| 19] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 3, 12, 2, 11, 17, 4, 13, - ["Render", false], 7, 8, 5, 6, 9, 10, + ["Render", false], 7, 8, 5, 18, 6, 9, 10, ["Truchet", true, 14], 15, 16, ]; @@ -71,6 +80,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -80,7 +90,6 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, var _mode = _data[7]; var _col_gap = _data[6]; - var _gra = _data[5]; inputs[| 5].setVisible(_mode == 0); inputs[| 6].setVisible(_mode != 1); @@ -106,7 +115,7 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, shader_set_f("truchetSeed", _data[15]); shader_set_f("truchetThres", _data[16]); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_interpret_number/node_interpret_number.gml b/scripts/node_interpret_number/node_interpret_number.gml index c025438d7..b69715baa 100644 --- a/scripts/node_interpret_number/node_interpret_number.gml +++ b/scripts/node_interpret_number/node_interpret_number.gml @@ -12,20 +12,34 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, inputs[| 2] = nodeValue("Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 1 ] ) .setDisplay(VALUE_DISPLAY.range); - inputs[| 3] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 3] = nodeValue("Gradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(4); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 4] = nodeValueMap("Gradient map", self); + + inputs[| 5] = nodeValueGradientRange("Gradient map range", self, inputs[| 3]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ 0, - ["Interpret", false], 1, 2, 3, + ["Interpret", false], 1, 2, 3, 4, ]; attribute_surface_depth(); + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + var a = inputs[| 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getDimension()); active &= !a; + } + static step = function() { var _mode = getInputData(1); inputs[| 3].setVisible(_mode == 1); + inputs[| 3].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -34,7 +48,6 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, var _val = _data[0]; var _mod = _data[1]; var _ran = _data[2]; - var _grd = _data[3]; if(is_array(_val) && array_empty(_val)) return _outSurf; if(!is_array(_val)) _val = [ _val ]; @@ -47,7 +60,8 @@ function Node_Interpret_Number(_x, _y, _group = noone) : Node_Processor(_x, _y, surface_set_shader(_outSurf, sh_interpret_number); shader_set_i("mode", _mod); shader_set_f("range", _ran); - _grd.shader_submit(); + + shader_set_gradient(_data[3], _data[4], _data[5], inputs[| 3]); for(var i = 0; i < _amo; i += BATCH_SIZE) { var _arr = []; diff --git a/scripts/node_path_from_mask/node_path_from_mask.gml b/scripts/node_path_from_mask/node_path_from_mask.gml new file mode 100644 index 000000000..ccce6fd67 --- /dev/null +++ b/scripts/node_path_from_mask/node_path_from_mask.gml @@ -0,0 +1,199 @@ +function Node_Path_From_Mask(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + name = "Path from Mask"; + + inputs[| 0] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); + + inputs[| 1] = nodeValue("Smooth angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 15); + + outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.pathnode, self); + + temp_surface = [ surface_create(1, 1) ]; + + anchors = []; + lengthTotal = 0; + lengths = []; + lengthAccs = []; + boundary = new BoundingBox(); + loop = true; + + static getBoundary = function() { return boundary; } + static getAccuLength = function() { return lengthAccs; } + static getLength = function() { return lengthTotal; } + static getSegmentCount = function() { return 1; } + static getLineCount = function() { return 1; } + + static getPointDistance = function(_seg, _ind = 0, out = undefined) { #region + if(out == undefined) out = new __vec2(); else { out.x = 0; out.y = 0; } + + var _aid = 0; + var _dst = _seg; + + for( var i = 0, n = array_length(lengthAccs); i < n; i++ ) { + if(_seg == lengthAccs[i]) { + out.x = anchors[i][0]; + out.y = anchors[i][1]; + + return out; + } + + if(_seg < lengthAccs[i]) { + _aid = i; + if(i) _dst = _seg - lengthAccs[i - 1]; + break; + } + } + + out.x = lerp(anchors[i][0], anchors[i + 1][0], _dst / lengths[_aid]); + out.y = lerp(anchors[i][1], anchors[i + 1][1], _dst / lengths[_aid]); + + return out; + } #endregion + + static getPointRatio = function(_rat, _ind = 0, out = undefined) { #region + var pix = frac(_rat) * lengthTotal; + return getPointDistance(pix, _ind, out); + } #endregion + + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region + + draw_set_color(COLORS._main_accent); + var ox, oy, nx, ny, sx, sy; + + for( var i = 0, n = array_length(anchors); i < n; i++ ) { + nx = _x + anchors[i][0] * _s; + ny = _y + anchors[i][1] * _s; + + if(i) draw_line(ox, oy, nx, ny); + else { + sx = nx; + sy = ny; + } + + draw_circle(nx, ny, 3, false); + + ox = nx; + oy = ny; + } + } #endregion + + static update = function(frame = CURRENT_FRAME) { #region + var _surf = getInputData(0); + var _smt = getInputData(1); + + anchors = []; + if(!is_surface(_surf)) return; + + var _dim = surface_get_dimension(_surf); + temp_surface[0] = surface_verify(temp_surface[0], _dim[0], _dim[1]); + + surface_set_shader(temp_surface[0], sh_image_trace); + shader_set_f("dimension", _dim); + draw_surface(_surf, 0, 0); + surface_reset_shader(); + + var _w = _dim[0], _h = _dim[1]; + var _x = 0, _y = 0; + + var _buff = buffer_from_surface(temp_surface[0], false); + var _emp = false; + + while(buffer_getPixel(_buff, _w, _h, _x, _y) == 0) { + _x++; + if(_x == _w) { + _x = 0; + _y++; + if(_y == _h) { + _emp = true; + break; + } + } + } + + if(_emp) return; + + var _sx = _x; + var _sy = _y; + var _c = 0; + var _px = _x; + var _py = _y; + var _a = []; + var _amo = _w * _h; + var _rep = 0; + + do { + buffer_setPixel(_buff, _w, _h, _x, _y, 0); + array_push(_a, [ _x + 0.5, _y + 0.5 ]); + + if(_x < _w - 1 && buffer_getPixel(_buff, _w, _h, _x + 1, _y)) { _x++; } + else if(_y < _h - 1 && buffer_getPixel(_buff, _w, _h, _x, _y + 1)) { _y++; } + else if(_x > 0 && buffer_getPixel(_buff, _w, _h, _x - 1, _y)) { _x--; } + else if(_y > 0 && buffer_getPixel(_buff, _w, _h, _x, _y - 1)) { _y--; } + + else if(_x < _w - 1 && _y < _h - 1 && buffer_getPixel(_buff, _w, _h, _x + 1, _y + 1)) { _x++; _y++; } + else if(_x < _w - 1 && _y > 0 && buffer_getPixel(_buff, _w, _h, _x + 1, _y - 1)) { _x++; _y--; } + else if(_x > 0 && _y < _h - 1 && buffer_getPixel(_buff, _w, _h, _x - 1, _y + 1)) { _x--; _y++; } + else if(_x > 0 && _y > 0 && buffer_getPixel(_buff, _w, _h, _x - 1, _y - 1)) { _x--; _y--; } + + if(++_rep >= _amo) break; + } until(_x == _sx && _y == _sy); + + buffer_delete(_buff); + + anchors = []; + + var lx = _a[0][0]; + var ly = _a[0][1]; + var ox, oy, nx, ny; + + array_push(_a, _a[0]); + array_push(anchors, _a[0]); + + for( var i = 0, n = array_length(_a); i < n; i++ ) { + nx = _a[i][0]; + ny = _a[i][1]; + + if(i) { + var na = point_direction(ox, oy, nx, ny); + var la = point_direction(lx, ly, nx, ny); + + if(abs(angle_difference(na, la)) > _smt) { + lx = ox; + ly = oy; + + array_push(anchors, [ ox, oy ]); + } + } + + ox = nx; + oy = ny; + } + + array_push(anchors, _a[0]); + + var ox, oy, nx, ny; + lengthTotal = 0; + lengths = []; + lengthAccs = []; + boundary = new BoundingBox(); + + for( var i = 0, n = array_length(anchors); i < n; i++ ) { + nx = _a[i][0]; + ny = _a[i][1]; + + boundary.addPoint(nx, ny); + + if(i) { + var ds = point_distance(ox, oy, nx, ny); + lengthTotal += ds; + array_push(lengths, ds); + array_push(lengthAccs, lengthTotal); + } + + ox = nx; + oy = ny; + } + } #endregion + + static getGraphPreviewSurface = function() { return /*temp_surface[0]*/ getInputData(0); } + static getPreviewValues = function() { return /*temp_surface[0]*/ getInputData(0); } +} \ No newline at end of file diff --git a/scripts/node_path_from_mask/node_path_from_mask.yy b/scripts/node_path_from_mask/node_path_from_mask.yy new file mode 100644 index 000000000..1b81a820b --- /dev/null +++ b/scripts/node_path_from_mask/node_path_from_mask.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_path_from_mask", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "path", + "path": "folders/nodes/data/value/path.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_pixel_cloud/node_pixel_cloud.gml b/scripts/node_pixel_cloud/node_pixel_cloud.gml index 529b33bf8..f91d5d6d9 100644 --- a/scripts/node_pixel_cloud/node_pixel_cloud.gml +++ b/scripts/node_pixel_cloud/node_pixel_cloud.gml @@ -10,7 +10,8 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 3] = nodeValue("Strength map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 4] = nodeValue("Color over lifetime", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(9); inputs[| 5] = nodeValue("Distance", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1); @@ -22,10 +23,18 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 9] = nodeValueMap("Gradient map", self); + + inputs[| 10] = nodeValueGradientRange("Gradient map range", self, inputs[| 4]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ 8, ["Input", true], 0, 1, ["Movement", false], 5, 2, 3, - ["Color", true], 4, 6, 7 + ["Color", true], 4, 9, 6, 7 ] outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -33,7 +42,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); static step = function() { - + inputs[| 4].mappableStep(); } static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -46,7 +55,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_i("useMap", is_surface(_data[3])); shader_set_surface("strengthMap", _data[3]); - _data[4].shader_submit(); + shader_set_gradient(_data[4], _data[9], _data[10], inputs[| 4]); shader_set_f("alpha_curve" , _data[6]); shader_set_i("curve_amount", array_length(_data[6])); diff --git a/scripts/node_pythagorean_tile/node_pythagorean_tile.gml b/scripts/node_pythagorean_tile/node_pythagorean_tile.gml index c1ea1bd64..9ed50cc2d 100644 --- a/scripts/node_pythagorean_tile/node_pythagorean_tile.gml +++ b/scripts/node_pythagorean_tile/node_pythagorean_tile.gml @@ -20,7 +20,8 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(18); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -52,11 +53,19 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ inputs[| 17] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 90) .setDisplay(VALUE_DISPLAY.rotation); - + + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 18] = nodeValueMap("Gradient map", self); + + inputs[| 19] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 3, 12, 2, 11, 17, 4, 13, - ["Render", false], 7, 8, 5, 6, 9, 10, + ["Render", false], 7, 8, 5, 18, 6, 9, 10, ["Truchet", true, 14], 15, 16, ]; @@ -65,13 +74,15 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 19].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -107,7 +118,7 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _ shader_set_f("truchetSeed", _data[15]); shader_set_f("truchetThres", _data[16]); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_random_tile/node_random_tile.gml b/scripts/node_random_tile/node_random_tile.gml index f58d81910..159d27899 100644 --- a/scripts/node_random_tile/node_random_tile.gml +++ b/scripts/node_random_tile/node_random_tile.gml @@ -20,7 +20,8 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou .setDisplay(VALUE_DISPLAY.slider, { range: [0, 0.5, 0.01] }) .setMappable(13); - inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 5] = nodeValue("Tile color", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(17); inputs[| 6] = nodeValue("Gap color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); @@ -50,10 +51,18 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 16] = nodeValue("Truchet threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) .setDisplay(VALUE_DISPLAY.slider) + ////////////////////////////////////////////////////////////////////////////////////////////////// + + inputs[| 17] = nodeValueMap("Gradient map", self); + + inputs[| 18] = nodeValueGradientRange("Gradient map range", self, inputs[| 5]); + + ////////////////////////////////////////////////////////////////////////////////////////////////// + input_display_list = [ ["Output", false], 0, ["Pattern", false], 1, 3, 12, 2, 11, 4, 13, - ["Render", false], 7, 8, 5, 6, 9, 10, + ["Render", false], 7, 8, 5, 17, 6, 9, 10, ["Truchet", true, 14], 15, 16, ]; @@ -62,13 +71,15 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou attribute_surface_depth(); static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { - inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); + var a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 18].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } static step = function() { #region inputs[| 2].mappableStep(); inputs[| 3].mappableStep(); inputs[| 4].mappableStep(); + inputs[| 5].mappableStep(); } #endregion static processData = function(_outSurf, _data, _output_index, _array_index) { @@ -78,7 +89,6 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou var _mode = _data[7]; var _col_gap = _data[6]; - var _gra = _data[5]; inputs[| 5].setVisible(_mode == 0); inputs[| 6].setVisible(_mode != 1); @@ -103,7 +113,7 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou shader_set_f("truchetSeed", _data[15]); shader_set_f("truchetThres", _data[16]); - _gra.shader_submit(); + shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]); if(is_surface(_sam)) draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]); else draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 457cf1c28..7364ec3b3 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -790,7 +790,8 @@ function __initNodes() { addNodeObject(values, "Path Builder", s_node_path_builder, "Node_Path_Builder", [1, Node_Path_Builder],, "Create path from array of vec2 points.").setVersion(1137); addNodeObject(values, "L system", s_node_path_l_system, "Node_Path_L_System", [1, Node_Path_L_System]).setVersion(1137); addNodeObject(values, "Path plot", s_node_path_plot, "Node_Path_Plot", [1, Node_Path_Plot]).setVersion(1138); - + addNodeObject(values, "Path from Mask", s_node_path_from_mask, "Node_Path_From_Mask", [1, Node_Path_From_Mask]).setVersion(11640); + ds_list_add(values, "Boolean"); addNodeObject(values, "Boolean", s_node_boolean, "Node_Boolean", [1, Node_Boolean]); addNodeObject(values, "Compare", s_node_compare, "Node_Compare", [0, Node_create_Compare], ["equal", "greater", "lesser"]); diff --git a/scripts/node_repeat/node_repeat.gml b/scripts/node_repeat/node_repeat.gml index 91bf2911e..0ccc6d3f8 100644 --- a/scripts/node_repeat/node_repeat.gml +++ b/scripts/node_repeat/node_repeat.gml @@ -146,7 +146,6 @@ function Node_Repeat(_x, _y, _group = noone) : Node(_x, _y, _group) constructor var _prsh = getInputData(13); var _grad = getInputData(14); - //var _alph = getInputData(15); var _arr = getInputData(16); var _sed = getInputData(17); diff --git a/scripts/node_stripe/node_stripe.gml b/scripts/node_stripe/node_stripe.gml index 44ca262a2..fcdc509cd 100644 --- a/scripts/node_stripe/node_stripe.gml +++ b/scripts/node_stripe/node_stripe.gml @@ -24,7 +24,8 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 6] = nodeValue("Random color", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); - inputs[| 7] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ); + inputs[| 7] = nodeValue("Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white) ) + .setMappable(15); inputs[| 8] = nodeValue("Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); @@ -44,6 +45,10 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 14] = nodeValueMap("Ratio map", self); + inputs[| 15] = nodeValueMap("Gradient map", self); + + inputs[| 16] = nodeValueGradientRange("Gradient map range", self, inputs[| 7]); + ////////////////////////////////////////////////////////////////////////////////////////////////// outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); @@ -52,7 +57,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co ["Output", true], 0, ["Pattern", false], 1, 11, 10, 14, 2, 12, 4, 5, 13, ["Render", false], 3, - ["Random Colors", false, 6], 7, 8, 9, + ["Random Colors", false, 6], 7, 15, 8, 9, ]; attribute_surface_depth(); @@ -62,14 +67,16 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co var px = _x + pos[0] * _s; var py = _y + pos[1] * _s; - inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); - inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); + var a = inputs[| 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny); active &= !a; + var a = inputs[| 16].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny, getSingleValue(0)); active &= !a; } #endregion static step = function() { #region inputs[| 1].mappableStep(); inputs[| 2].mappableStep(); inputs[| 5].mappableStep(); + inputs[| 7].mappableStep(); inputs[| 10].mappableStep(); } #endregion @@ -85,8 +92,6 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co inputs[| 8].setVisible(!_grad_use); inputs[| 9].setVisible(!_grad_use); - var _gra = _data[7]; - _outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth()); surface_set_shader(_outSurf, sh_stripe); @@ -103,7 +108,7 @@ function Node_Stripe(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co shader_set_color("color1", _clr1); shader_set_i("gradient_use", _grad_use); - _gra.shader_submit(); + shader_set_gradient(_data[7], _data[15], _data[16], inputs[| 7]); draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1); surface_reset_shader(); diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 33ad59caa..871eeb9c9 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -88,6 +88,7 @@ enum VALUE_DISPLAY { corner, toggle, matrix, + gradient_range, //Curve curve, @@ -365,6 +366,7 @@ function typeArray(_type) { #region case VALUE_DISPLAY.rotation_range : case VALUE_DISPLAY.rotation_random : case VALUE_DISPLAY.slider_range : + case VALUE_DISPLAY.gradient_range : case VALUE_DISPLAY.vector : case VALUE_DISPLAY.padding : @@ -508,7 +510,8 @@ function nodeValueUnit(_nodeValue) constructor { #region } #endregion function nodeValue(_name, _node, _connect, _type, _value, _tooltip = "") { return new NodeValue(_name, _node, _connect, _type, _value, _tooltip); } -function nodeValueMap(_name, _node) { return new NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false, false); } +function nodeValueMap(_name, _node, _junc = noone) { return new NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone).setVisible(false, false).setMapped(_junc); } +function nodeValueGradientRange(_name, _node, _junc = noone) { return new NodeValue(_name, _node, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 1, 0 ]).setDisplay(VALUE_DISPLAY.gradient_range).setVisible(false, false).setMapped(_junc); } function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constructor { static DISPLAY_DATA_KEYS = [ "linked", "angle_display", "bone_id", "area_type", "unit", "atlas_crop" ]; @@ -1297,17 +1300,30 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru .setIcon( THEME.value_use_surface, [ function() { return attributes.mapped; } ], COLORS._main_icon ) .setTooltip("Toggle map"); - mapWidget = new vectorBox(2, function(index, val) { return setValueDirect(val, index); }); - mapWidget.side_button = mapButton; - mapWidget.setMinMax(); + switch(type) { + case VALUE_TYPE.gradient : + mapWidget = noone; + break; + + default : + mapWidget = new vectorBox(2, function(index, val) { return setValueDirect(val, index); }); + mapWidget.side_button = mapButton; + mapWidget.setMinMax(); + break; + } editWidget.side_button = mapButton; return self; } #endregion + static setMapped = function(junc) { #region + mappedJunc = junc; + return self; + } #endregion + static mappableStep = function() { #region - editWidget = attributes.mapped? mapWidget : editWidgetRaw; + editWidget = mapWidget && attributes.mapped? mapWidget : editWidgetRaw; setArrayDepth(attributes.mapped); var inp = node.inputs[| attributes.map_index]; @@ -2176,6 +2192,13 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var _spr = argument_count > 8? argument[8] : THEME.anchor_selector; var _sca = argument_count > 9? argument[9] : 1; return preview_overlay_vector(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _spr); + + case VALUE_DISPLAY.gradient_range : + var _dim = argument[8]; + + if(mappedJunc.attributes.mapped) + return preview_overlay_gradient_range(isLeaf(), active, _x, _y, _s, _mx, _my, _snx, _sny, _dim); + break; case VALUE_DISPLAY.area : var _flag = argument_count > 8? argument[8] : 0b0011; diff --git a/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml new file mode 100644 index 000000000..0fbf1eda8 --- /dev/null +++ b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.gml @@ -0,0 +1,87 @@ +function preview_overlay_gradient_range(interact, active, _x, _y, _s, _mx, _my, _snx, _sny, _dim) { + var _val = array_clone(getValue()); + var hover = -1; + if(!is_array(_val) || array_empty(_val)) return hover; + if(is_array(_val[0])) return hover; + + var _sw = _dim[0]; + var _sh = _dim[1]; + + var __x0 = _val[0] * _sw; + var __y0 = _val[1] * _sh; + var __x1 = _val[2] * _sw; + var __y1 = _val[3] * _sh; + + var _ax0 = __x0 * _s + _x; + var _ay0 = __y0 * _s + _y; + var _ax1 = __x1 * _s + _x; + var _ay1 = __y1 * _s + _y; + + draw_set_color(COLORS._main_accent); + draw_line(_ax0, _ay0, _ax1, _ay1); + + var d0 = false; + var d1 = false; + + draw_set_text(f_p1, fa_left, fa_bottom, COLORS._main_accent); + draw_text(_ax0 + ui(4), _ay0 - ui(4), "1"); + draw_text(_ax1 + ui(4), _ay1 - ui(4), "2"); + + if(drag_type) { + if(drag_type == 1) { draw_sprite_colored(THEME.anchor_selector, 1, _ax0, _ay0); d0 = true; } + if(drag_type == 2) { draw_sprite_colored(THEME.anchor_selector, 1, _ax1, _ay1); d1 = true; } + + var _nx = value_snap((drag_sx + (_mx - drag_mx) - _x) / _s, _snx); + var _ny = value_snap((drag_sy + (_my - drag_my) - _y) / _s, _sny); + + if(key_mod_press(CTRL)) { + _nx = round(_nx); + _ny = round(_ny); + } + + _val[(drag_type - 1) * 2 + 0] = _nx / _sw; + _val[(drag_type - 1) * 2 + 1] = _ny / _sh; + + if(setValue( _val )) + UNDO_HOLDING = true; + + if(mouse_release(mb_left)) { + drag_type = 0; + UNDO_HOLDING = false; + } + + } else if(interact && active) { + if(point_in_circle(_mx, _my, _ax0, _ay0, 8)) { + d0 = true; + hover = 1; + + draw_sprite_colored(THEME.anchor_selector, 1, _ax0, _ay0); + + if(mouse_press(mb_left, active)) { + drag_type = hover; + drag_mx = _mx; + drag_my = _my; + drag_sx = _ax0; + drag_sy = _ay0; + } + } else if(point_in_circle(_mx, _my, _ax1, _ay1, 8)) { + d1 = true; + hover = 2; + + draw_sprite_colored(THEME.anchor_selector, 1, _ax1, _ay1); + + if(mouse_press(mb_left, active)) { + drag_type = hover; + drag_mx = _mx; + drag_my = _my; + drag_sx = _ax1; + drag_sy = _ay1; + } + } + } + + if(d0 == false) draw_sprite_colored(THEME.anchor_selector, 0, _ax0, _ay0); + if(d1 == false) draw_sprite_colored(THEME.anchor_selector, 0, _ax1, _ay1); + + return hover; +} \ No newline at end of file diff --git a/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.yy b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.yy new file mode 100644 index 000000000..2ecd1dd72 --- /dev/null +++ b/scripts/preview_overlay_gradient_range/preview_overlay_gradient_range.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "preview_overlay_gradient_range", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "overlay", + "path": "folders/panels/preview/overlay.yy", + }, +} \ No newline at end of file diff --git a/shaders/sh_average/sh_average.yy b/shaders/sh_average/sh_average.yy index 896bde871..d9dfe84e5 100644 --- a/shaders/sh_average/sh_average.yy +++ b/shaders/sh_average/sh_average.yy @@ -4,7 +4,7 @@ "name": "sh_average", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_bevel/sh_bevel.fsh b/shaders/sh_bevel/sh_bevel.fsh index 78c8c4408..2366a4689 100644 --- a/shaders/sh_bevel/sh_bevel.fsh +++ b/shaders/sh_bevel/sh_bevel.fsh @@ -1,6 +1,3 @@ -// -// Simple passthrough fragment shader -// varying vec2 v_vTexcoord; varying vec4 v_vColour; diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.fsh b/shaders/sh_bevel_highp/sh_bevel_highp.fsh new file mode 100644 index 000000000..b418d4a77 --- /dev/null +++ b/shaders/sh_bevel_highp/sh_bevel_highp.fsh @@ -0,0 +1,104 @@ +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +#define TAU 6.283185307179586 + +uniform vec2 dimension; +uniform vec2 scale; +uniform vec2 shift; +uniform int slope; +uniform int sampleMode; + +uniform vec2 height; +uniform int heightUseSurf; +uniform sampler2D heightSurf; + +float bright(in vec4 col) { return (col.r + col.g + col.b) / 3. * col.a; } + +vec4 sampleTexture(vec2 pos) { #region + if(pos.x >= 0. && pos.y >= 0. && pos.x <= 1. && pos.y <= 1.) + return texture2D(gm_BaseTexture, pos); + + if(sampleMode == 0) + return vec4(0.); + if(sampleMode == 1) + return texture2D(gm_BaseTexture, clamp(pos, 0., 1.)); + if(sampleMode == 2) + return texture2D(gm_BaseTexture, fract(pos)); + + return vec4(0.); +} #endregion + +void main() { + float hei = height.x; + float heiMax = max(height.x, height.y); + + if(heightUseSurf == 1) { + vec4 _vMap = texture2D( heightSurf, v_vTexcoord ); + hei = mix(height.x, height.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); + } + + vec2 pixelStep = 1. / dimension; + + vec4 col = texture2D(gm_BaseTexture, v_vTexcoord); + vec4 col1; + gl_FragColor = col; + bool done = false; + + vec2 shiftPx = -shift / dimension; + float b0 = bright(col); + float shift_angle = atan(shiftPx.y, shiftPx.x); + float shift_distance = length(shiftPx); + float slope_distance = hei * b0; + float max_distance = hei; + + if(b0 == 0.) return; + + float b1 = b0; + float added_distance, _b1; + vec2 shf, pxs; + + for(float i = 1.; i < heiMax; i++) { + if(i >= hei) break; + + float base = 1.; + float top = 0.; + for(float j = 0.; j <= 512.; j++) { + float ang = top / base * TAU; + top += 2.; + if(top >= base) { + top = 1.; + base *= 2.; + } + + added_distance = 1. + cos(abs(shift_angle - ang)) * shift_distance; + + shf = vec2( cos(ang), sin(ang)) * (i * added_distance) / scale; + pxs = v_vTexcoord + shf * pixelStep; + + col1 = sampleTexture( pxs ); + _b1 = bright(col1); + + if(_b1 < b1) { + slope_distance = min(slope_distance, i); + max_distance = min(max_distance, (b0 - _b1) * hei); + b1 = min(b1, _b1); + + i = hei; + break; + } + } + } + + if(max_distance == 0.) + gl_FragColor = vec4(vec3(b0), col.a); + else { + float mx = slope_distance / max_distance; + if(slope == 1) mx = pow(mx, 3.) + 3. * mx * mx * (1. - mx); + else if(slope == 2) mx = sqrt(1. - pow(mx - 1., 2.)); + + mx = clamp(mx, 0., 1.); + float prg = mix(b1, b0, mx); + gl_FragColor = vec4(vec3(prg), col.a); + } +} diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.vsh b/shaders/sh_bevel_highp/sh_bevel_highp.vsh new file mode 100644 index 000000000..d4b316559 --- /dev/null +++ b/shaders/sh_bevel_highp/sh_bevel_highp.vsh @@ -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; +} diff --git a/shaders/sh_bevel_highp/sh_bevel_highp.yy b/shaders/sh_bevel_highp/sh_bevel_highp.yy new file mode 100644 index 000000000..672b2b48f --- /dev/null +++ b/shaders/sh_bevel_highp/sh_bevel_highp.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_bevel_highp", + "parent": { + "name": "2d effect", + "path": "folders/shader/3d/2d effect.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_bevel_highp/sh_normal.yy b/shaders/sh_bevel_highp/sh_normal.yy new file mode 100644 index 000000000..98a621d98 --- /dev/null +++ b/shaders/sh_bevel_highp/sh_normal.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "3d", + "path": "folders/shader/3d.yy", + }, + "resourceVersion": "1.0", + "name": "sh_normal", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blur_alpha/sh_blur_alpha.yy b/shaders/sh_blur_alpha/sh_blur_alpha.yy index bac351256..3d5f7e50f 100644 --- a/shaders/sh_blur_alpha/sh_blur_alpha.yy +++ b/shaders/sh_blur_alpha/sh_blur_alpha.yy @@ -4,7 +4,7 @@ "name": "sh_blur_alpha", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_bokeh/sh_blur_bokeh.yy b/shaders/sh_blur_bokeh/sh_blur_bokeh.yy index b232c6d89..bf3facb7f 100644 --- a/shaders/sh_blur_bokeh/sh_blur_bokeh.yy +++ b/shaders/sh_blur_bokeh/sh_blur_bokeh.yy @@ -4,7 +4,7 @@ "name": "sh_blur_bokeh", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_box_contrast/sh_blur_box_contrast.yy b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.yy index bc22567f7..5761d27dd 100644 --- a/shaders/sh_blur_box_contrast/sh_blur_box_contrast.yy +++ b/shaders/sh_blur_box_contrast/sh_blur_box_contrast.yy @@ -4,7 +4,7 @@ "name": "sh_blur_box_contrast", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_directional/sh_blur_directional.yy b/shaders/sh_blur_directional/sh_blur_directional.yy index f367fcb87..27584999c 100644 --- a/shaders/sh_blur_directional/sh_blur_directional.yy +++ b/shaders/sh_blur_directional/sh_blur_directional.yy @@ -4,7 +4,7 @@ "name": "sh_blur_directional", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_final/sh_blur_final.yy b/shaders/sh_blur_final/sh_blur_final.yy index fc8e7eb97..a1d2a8444 100644 --- a/shaders/sh_blur_final/sh_blur_final.yy +++ b/shaders/sh_blur_final/sh_blur_final.yy @@ -4,7 +4,7 @@ "name": "sh_blur_final", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_gaussian/sh_blur_gaussian.yy b/shaders/sh_blur_gaussian/sh_blur_gaussian.yy index 5e7ba1aab..5f9978712 100644 --- a/shaders/sh_blur_gaussian/sh_blur_gaussian.yy +++ b/shaders/sh_blur_gaussian/sh_blur_gaussian.yy @@ -4,7 +4,7 @@ "name": "sh_blur_gaussian", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_radial/sh_blur_radial.yy b/shaders/sh_blur_radial/sh_blur_radial.yy index 225413a36..1fbac6e84 100644 --- a/shaders/sh_blur_radial/sh_blur_radial.yy +++ b/shaders/sh_blur_radial/sh_blur_radial.yy @@ -4,7 +4,7 @@ "name": "sh_blur_radial", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_simple/sh_blur_simple.yy b/shaders/sh_blur_simple/sh_blur_simple.yy index f2f3a5fdd..dc73ce0e5 100644 --- a/shaders/sh_blur_simple/sh_blur_simple.yy +++ b/shaders/sh_blur_simple/sh_blur_simple.yy @@ -4,7 +4,7 @@ "name": "sh_blur_simple", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_blur_zoom/sh_blur_zoom.yy b/shaders/sh_blur_zoom/sh_blur_zoom.yy index e401ba706..69829cd94 100644 --- a/shaders/sh_blur_zoom/sh_blur_zoom.yy +++ b/shaders/sh_blur_zoom/sh_blur_zoom.yy @@ -4,7 +4,7 @@ "name": "sh_blur_zoom", "parent": { "name": "blur", - "path": "folders/shader/blur.yy", + "path": "folders/shader/filter/blur.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_A/sh_channel_A.yy b/shaders/sh_channel_A/sh_channel_A.yy index dac790cea..9333554e9 100644 --- a/shaders/sh_channel_A/sh_channel_A.yy +++ b/shaders/sh_channel_A/sh_channel_A.yy @@ -4,7 +4,7 @@ "name": "sh_channel_A", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_A_grey/sh_channel_A_grey.yy b/shaders/sh_channel_A_grey/sh_channel_A_grey.yy index 8aabfdef7..7d72e0ae3 100644 --- a/shaders/sh_channel_A_grey/sh_channel_A_grey.yy +++ b/shaders/sh_channel_A_grey/sh_channel_A_grey.yy @@ -4,7 +4,7 @@ "name": "sh_channel_A_grey", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_B/sh_channel_B.yy b/shaders/sh_channel_B/sh_channel_B.yy index 48ef2a2ce..0d304c5fc 100644 --- a/shaders/sh_channel_B/sh_channel_B.yy +++ b/shaders/sh_channel_B/sh_channel_B.yy @@ -4,7 +4,7 @@ "name": "sh_channel_B", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_B_grey/sh_channel_B_grey.yy b/shaders/sh_channel_B_grey/sh_channel_B_grey.yy index 59b4cb5a7..84e182532 100644 --- a/shaders/sh_channel_B_grey/sh_channel_B_grey.yy +++ b/shaders/sh_channel_B_grey/sh_channel_B_grey.yy @@ -4,7 +4,7 @@ "name": "sh_channel_B_grey", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_G/sh_channel_G.yy b/shaders/sh_channel_G/sh_channel_G.yy index 2ad0cc2a6..0d3f89d82 100644 --- a/shaders/sh_channel_G/sh_channel_G.yy +++ b/shaders/sh_channel_G/sh_channel_G.yy @@ -4,7 +4,7 @@ "name": "sh_channel_G", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_G_grey/sh_channel_G_grey.yy b/shaders/sh_channel_G_grey/sh_channel_G_grey.yy index d0a6c05c7..fdd621f9a 100644 --- a/shaders/sh_channel_G_grey/sh_channel_G_grey.yy +++ b/shaders/sh_channel_G_grey/sh_channel_G_grey.yy @@ -4,7 +4,7 @@ "name": "sh_channel_G_grey", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_H/sh_channel_H.yy b/shaders/sh_channel_H/sh_channel_H.yy index 8a72a00f8..f97696432 100644 --- a/shaders/sh_channel_H/sh_channel_H.yy +++ b/shaders/sh_channel_H/sh_channel_H.yy @@ -4,7 +4,7 @@ "name": "sh_channel_H", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_R/sh_channel_R.yy b/shaders/sh_channel_R/sh_channel_R.yy index 8eee20902..8827abc25 100644 --- a/shaders/sh_channel_R/sh_channel_R.yy +++ b/shaders/sh_channel_R/sh_channel_R.yy @@ -4,7 +4,7 @@ "name": "sh_channel_R", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_R2A/sh_channel_R2A.yy b/shaders/sh_channel_R2A/sh_channel_R2A.yy index bfd9299ea..6947c552d 100644 --- a/shaders/sh_channel_R2A/sh_channel_R2A.yy +++ b/shaders/sh_channel_R2A/sh_channel_R2A.yy @@ -4,7 +4,7 @@ "name": "sh_channel_R2A", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_R2B/sh_channel_R2B.yy b/shaders/sh_channel_R2B/sh_channel_R2B.yy index 140785c78..a40beb94a 100644 --- a/shaders/sh_channel_R2B/sh_channel_R2B.yy +++ b/shaders/sh_channel_R2B/sh_channel_R2B.yy @@ -4,7 +4,7 @@ "name": "sh_channel_R2B", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_R2G/sh_channel_R2G.yy b/shaders/sh_channel_R2G/sh_channel_R2G.yy index 6e9298481..deee33226 100644 --- a/shaders/sh_channel_R2G/sh_channel_R2G.yy +++ b/shaders/sh_channel_R2G/sh_channel_R2G.yy @@ -4,7 +4,7 @@ "name": "sh_channel_R2G", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_R_grey/sh_channel_R_grey.yy b/shaders/sh_channel_R_grey/sh_channel_R_grey.yy index e364a4197..d493bd121 100644 --- a/shaders/sh_channel_R_grey/sh_channel_R_grey.yy +++ b/shaders/sh_channel_R_grey/sh_channel_R_grey.yy @@ -4,7 +4,7 @@ "name": "sh_channel_R_grey", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_S/sh_channel_S.yy b/shaders/sh_channel_S/sh_channel_S.yy index 48f643cfc..a8f0415de 100644 --- a/shaders/sh_channel_S/sh_channel_S.yy +++ b/shaders/sh_channel_S/sh_channel_S.yy @@ -4,7 +4,7 @@ "name": "sh_channel_S", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_channel_V/sh_channel_V.yy b/shaders/sh_channel_V/sh_channel_V.yy index 3ec99db7f..34834eecb 100644 --- a/shaders/sh_channel_V/sh_channel_V.yy +++ b/shaders/sh_channel_V/sh_channel_V.yy @@ -4,7 +4,7 @@ "name": "sh_channel_V", "parent": { "name": "channels", - "path": "folders/shader/channels.yy", + "path": "folders/shader/filter/channels.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_colorize/sh_colorize.fsh b/shaders/sh_colorize/sh_colorize.fsh index 2f17e0c47..1be49f906 100644 --- a/shaders/sh_colorize/sh_colorize.fsh +++ b/shaders/sh_colorize/sh_colorize.fsh @@ -1,6 +1,3 @@ -// -// Simple passthrough fragment shader -// varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -9,6 +6,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int multiply_alpha; @@ -51,6 +51,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_dilate/sh_dilate.yy b/shaders/sh_dilate/sh_dilate.yy index 74f9d5d2f..098cd07f7 100644 --- a/shaders/sh_dilate/sh_dilate.yy +++ b/shaders/sh_dilate/sh_dilate.yy @@ -4,7 +4,7 @@ "name": "sh_dilate", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_displace/sh_displace.yy b/shaders/sh_displace/sh_displace.yy index 38276fa30..c336728d8 100644 --- a/shaders/sh_displace/sh_displace.yy +++ b/shaders/sh_displace/sh_displace.yy @@ -4,7 +4,7 @@ "name": "sh_displace", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_flip/sh_flip.yy b/shaders/sh_flip/sh_flip.yy index ef1f01132..d4ffcdbfd 100644 --- a/shaders/sh_flip/sh_flip.yy +++ b/shaders/sh_flip/sh_flip.yy @@ -4,7 +4,7 @@ "name": "sh_flip", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_gradient/sh_gradient.fsh b/shaders/sh_gradient/sh_gradient.fsh index 176024d5c..082444bbd 100644 --- a/shaders/sh_gradient/sh_gradient.fsh +++ b/shaders/sh_gradient/sh_gradient.fsh @@ -29,8 +29,6 @@ uniform int type; uniform int gradient_loop; uniform int uniAsp; -float sca; - #region ////////////////////////////////////////// GRADIENT BEGIN ////////////////////////////////////////// #define GRADIENT_LIMIT 128 @@ -38,6 +36,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); @@ -74,6 +75,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { } vec4 gradientEval(in float prog) { + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); float _ptime = 0.; @@ -84,7 +90,6 @@ vec4 gradientEval(in float prog) { } float _time = gradient_time[i]; - _time = 0.5 + (_time - 0.5) * sca; if(_time == prog) { col = gradient_color[i]; @@ -134,7 +139,7 @@ void main() { shf = mix(shift.x, shift.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); } - sca = scale.x; + float sca = scale.x; if(scaleUseSurf == 1) { vec4 _vMap = texture2D( scaleSurf, v_vTexcoord ); sca = mix(scale.x, scale.y, (_vMap.r + _vMap.g + _vMap.b) / 3.); @@ -160,12 +165,13 @@ void main() { } - prog += shf; + prog = (prog + shf - 0.5) * sca + 0.5; - if(gradient_loop == 1) { - prog = abs(prog); - if(prog > 1.) - prog = prog == floor(prog)? 1. : fract(prog); + if(gradient_loop == 1) { + prog = fract(prog < 0.? 1. - abs(prog) : prog); + } else if(gradient_loop == 2) { + prog = mod(abs(prog), 2.); + if(prog >= 1.) prog = 2. - prog; } vec4 col = gradientEval(prog); diff --git a/shaders/sh_grid/sh_grid.fsh b/shaders/sh_grid/sh_grid.fsh index 40304b1d8..db8f8bdb2 100644 --- a/shaders/sh_grid/sh_grid.fsh +++ b/shaders/sh_grid/sh_grid.fsh @@ -35,6 +35,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -77,6 +80,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_grid_hex/sh_grid_hex.fsh b/shaders/sh_grid_hex/sh_grid_hex.fsh index d29578e05..1462798f8 100644 --- a/shaders/sh_grid_hex/sh_grid_hex.fsh +++ b/shaders/sh_grid_hex/sh_grid_hex.fsh @@ -27,6 +27,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -71,6 +74,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_grid_tri/sh_grid_tri.fsh b/shaders/sh_grid_tri/sh_grid_tri.fsh index 29c806de8..f0573f949 100644 --- a/shaders/sh_grid_tri/sh_grid_tri.fsh +++ b/shaders/sh_grid_tri/sh_grid_tri.fsh @@ -32,6 +32,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -74,6 +77,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh b/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh index fe9ff3e9d..e277e6c36 100644 --- a/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh +++ b/shaders/sh_herringbone_tile/sh_herringbone_tile.fsh @@ -27,6 +27,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -74,6 +77,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { @@ -119,17 +127,18 @@ vec4 HerringboneCoords(vec2 uv) { #region uv.x /= tileLength; uv.x -= floor(uv.y) / tileLength; + vec2 id = floor(uv); uv = fract(uv); - - vec2 _uv = uv; + + vec2 _uv = uv; float maxH = 1.; - uv = abs(uv -.5) * 2.; + uv = abs(uv - .5) * 2.; uv.x = uv.x * tileLength - tileLength + 1.; float h = 1. - max(uv.x, uv.y); h = min(h, maxH); - return vec4(0., h / maxH, _uv); + return vec4(random(id), h / maxH, _uv); } #endregion void main() { #region @@ -168,8 +177,7 @@ void main() { #region } if(mode == 0) { - vec2 uv = abs(hc.zw) / sca; - colr = gradientEval(random(uv)); + colr = gradientEval(hc.x); } else if(mode == 2) { vec2 uv = hc.zw; diff --git a/shaders/sh_image_trace/sh_image_trace.fsh b/shaders/sh_image_trace/sh_image_trace.fsh new file mode 100644 index 000000000..8a94c1397 --- /dev/null +++ b/shaders/sh_image_trace/sh_image_trace.fsh @@ -0,0 +1,27 @@ +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; + +vec2 tx; + +bool sample(float x, float y) { + vec2 pos = v_vTexcoord + vec2(tx.x * x, tx.y * y); + if(pos.x < 0. || pos.y < 0. || pos.x > 1. || pos.y > 1.) return false; + + float c = texture2D( gm_BaseTexture, pos ).r; + return c > 0.; +} + +void main() { + tx = 1. / dimension; + vec4 cc = texture2D( gm_BaseTexture, v_vTexcoord ); + + gl_FragColor = vec4(0.); + if(cc.r == 0.) return; + + if(!sample(-1., 0.)) { gl_FragColor = vec4(1.); return; } + if(!sample( 1., 0.)) { gl_FragColor = vec4(1.); return; } + if(!sample(0., -1.)) { gl_FragColor = vec4(1.); return; } + if(!sample(0., 1.)) { gl_FragColor = vec4(1.); return; } +} diff --git a/shaders/sh_image_trace/sh_image_trace.vsh b/shaders/sh_image_trace/sh_image_trace.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_image_trace/sh_image_trace.vsh @@ -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; +} diff --git a/shaders/sh_image_trace/sh_image_trace.yy b/shaders/sh_image_trace/sh_image_trace.yy new file mode 100644 index 000000000..c3336ca3f --- /dev/null +++ b/shaders/sh_image_trace/sh_image_trace.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_image_trace", + "parent": { + "name": "filter", + "path": "folders/shader/filter.yy", + }, + "type": 1, +} \ No newline at end of file diff --git a/shaders/sh_interpret_number/sh_interpret_number.fsh b/shaders/sh_interpret_number/sh_interpret_number.fsh index 675c148d0..909aabee2 100644 --- a/shaders/sh_interpret_number/sh_interpret_number.fsh +++ b/shaders/sh_interpret_number/sh_interpret_number.fsh @@ -14,6 +14,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; vec3 rgb2hsv(vec3 c) { vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); @@ -50,6 +53,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { } vec4 gradientEval(in float prog) { + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_mirror/sh_mirror.yy b/shaders/sh_mirror/sh_mirror.yy index cb986a8eb..322ec84f4 100644 --- a/shaders/sh_mirror/sh_mirror.yy +++ b/shaders/sh_mirror/sh_mirror.yy @@ -4,7 +4,7 @@ "name": "sh_mirror", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_mirror_mask/sh_mirror_mask.yy b/shaders/sh_mirror_mask/sh_mirror_mask.yy index f6193b83b..30872a225 100644 --- a/shaders/sh_mirror_mask/sh_mirror_mask.yy +++ b/shaders/sh_mirror_mask/sh_mirror_mask.yy @@ -4,7 +4,7 @@ "name": "sh_mirror_mask", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_morph_surface/sh_morph_surface.yy b/shaders/sh_morph_surface/sh_morph_surface.yy index 059f9dd69..f474d5eee 100644 --- a/shaders/sh_morph_surface/sh_morph_surface.yy +++ b/shaders/sh_morph_surface/sh_morph_surface.yy @@ -4,7 +4,7 @@ "name": "sh_morph_surface", "parent": { "name": "morph", - "path": "folders/shader/morph.yy", + "path": "folders/shader/filter/morph.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_offset/sh_offset.yy b/shaders/sh_offset/sh_offset.yy index 5d494528c..b678294bb 100644 --- a/shaders/sh_offset/sh_offset.yy +++ b/shaders/sh_offset/sh_offset.yy @@ -4,7 +4,7 @@ "name": "sh_offset", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh b/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh index 75df0969e..6ae8654c4 100644 --- a/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh +++ b/shaders/sh_pixel_cloud/sh_pixel_cloud.fsh @@ -12,10 +12,13 @@ uniform float dist; uniform int useMap; uniform sampler2D strengthMap; -uniform int gradient_blend; -uniform vec4 gradient_color[GRADIENT_LIMIT]; +uniform int gradient_blend; +uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; -uniform int gradient_keys; +uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform float alpha_curve[64]; uniform int curve_amount; @@ -139,6 +142,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { } vec4 gradientEval(in float prog) { + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_polar/sh_polar.yy b/shaders/sh_polar/sh_polar.yy index b5b7a306c..c3d4a0f9e 100644 --- a/shaders/sh_polar/sh_polar.yy +++ b/shaders/sh_polar/sh_polar.yy @@ -4,7 +4,7 @@ "name": "sh_polar", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh index 043c97864..4f75ada2a 100644 --- a/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh +++ b/shaders/sh_pytagorean_tile/sh_pytagorean_tile.fsh @@ -30,6 +30,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -77,6 +80,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { @@ -164,7 +172,7 @@ vec4 PytagoreanCoords(vec2 uv) { #region vec2 dp = (0.5 - abs(puv)) * size; float d = min(dp.x, dp.y); - return vec4(0., d, puv); + return vec4(random(id), d, puv); } #endregion void main() { #region @@ -206,8 +214,7 @@ void main() { #region } if(mode == 0) { - vec2 uv = abs(hc.zw) / sca; - colr = gradientEval(random(uv)); + colr = gradientEval(abs(hc.x)); } else if(mode == 2) { vec2 uv = hc.zw + vec2(0.5, 0.5); diff --git a/shaders/sh_random_tile/sh_random_tile.fsh b/shaders/sh_random_tile/sh_random_tile.fsh index f07828bbb..5c93ee92b 100644 --- a/shaders/sh_random_tile/sh_random_tile.fsh +++ b/shaders/sh_random_tile/sh_random_tile.fsh @@ -27,6 +27,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; uniform int textureTruchet; uniform float truchetSeed; @@ -72,6 +75,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { @@ -139,7 +147,7 @@ vec4 RandomCoords(vec2 uv) { #region vec2 b = (.5 - abs(puv - .5)) * s; float d = min(b.x, b.y); - return vec4(0., d, puv); + return vec4(random(id), d, puv); } #endregion void main() { #region @@ -178,8 +186,7 @@ void main() { #region } if(mode == 0) { - vec2 uv = abs(hc.zw) / sca; - colr = gradientEval(random(uv)); + colr = gradientEval(hc.x); } else if(mode == 2) { vec2 uv = hc.zw; diff --git a/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy index ef62db7c2..7c7908de2 100644 --- a/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy +++ b/shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy @@ -4,7 +4,7 @@ "name": "sh_seperate_shape_counter", "parent": { "name": "shape seperator", - "path": "folders/shader/shape seperator.yy", + "path": "folders/shader/filter/shape seperator.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_seperate_shape_index/sh_seperate_shape_index.yy b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.yy index a56859805..5fe892cd7 100644 --- a/shaders/sh_seperate_shape_index/sh_seperate_shape_index.yy +++ b/shaders/sh_seperate_shape_index/sh_seperate_shape_index.yy @@ -4,7 +4,7 @@ "name": "sh_seperate_shape_index", "parent": { "name": "shape seperator", - "path": "folders/shader/shape seperator.yy", + "path": "folders/shader/filter/shape seperator.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.yy b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.yy index 89b52739e..0efe50694 100644 --- a/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.yy +++ b/shaders/sh_seperate_shape_ite/sh_seperate_shape_ite.yy @@ -4,7 +4,7 @@ "name": "sh_seperate_shape_ite", "parent": { "name": "shape seperator", - "path": "folders/shader/shape seperator.yy", + "path": "folders/shader/filter/shape seperator.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.yy b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.yy index 264f4f287..145115f9b 100644 --- a/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.yy +++ b/shaders/sh_seperate_shape_sep/sh_seperate_shape_sep.yy @@ -4,7 +4,7 @@ "name": "sh_seperate_shape_sep", "parent": { "name": "shape seperator", - "path": "folders/shader/shape seperator.yy", + "path": "folders/shader/filter/shape seperator.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_skew/sh_skew.yy b/shaders/sh_skew/sh_skew.yy index cfb2db675..8d5ecafd5 100644 --- a/shaders/sh_skew/sh_skew.yy +++ b/shaders/sh_skew/sh_skew.yy @@ -4,7 +4,7 @@ "name": "sh_skew", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_spherize/sh_spherize.yy b/shaders/sh_spherize/sh_spherize.yy index bc36ae986..f5d3ab044 100644 --- a/shaders/sh_spherize/sh_spherize.yy +++ b/shaders/sh_spherize/sh_spherize.yy @@ -4,7 +4,7 @@ "name": "sh_spherize", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_stripe/sh_stripe.fsh b/shaders/sh_stripe/sh_stripe.fsh index 6cc8ea194..b5b19f368 100644 --- a/shaders/sh_stripe/sh_stripe.fsh +++ b/shaders/sh_stripe/sh_stripe.fsh @@ -35,6 +35,9 @@ uniform int gradient_blend; uniform vec4 gradient_color[GRADIENT_LIMIT]; uniform float gradient_time[GRADIENT_LIMIT]; uniform int gradient_keys; +uniform int gradient_use_map; +uniform vec4 gradient_map_range; +uniform sampler2D gradient_map; vec3 rgb2hsv(vec3 c) { #region vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); @@ -71,6 +74,11 @@ vec3 hsvMix(vec3 c1, vec3 c2, float t) { #region } #endregion vec4 gradientEval(in float prog) { #region + if(gradient_use_map == 1) { + vec2 samplePos = mix(gradient_map_range.xy, gradient_map_range.zw, prog); + return texture2D( gradient_map, samplePos ); + } + vec4 col = vec4(0.); for(int i = 0; i < GRADIENT_LIMIT; i++) { diff --git a/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy index cfc8ecb1e..d209a2486 100644 --- a/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy +++ b/shaders/sh_surface_replace_fast_find/sh_surface_replace_fast_find.yy @@ -4,7 +4,7 @@ "name": "sh_surface_replace_fast_find", "parent": { "name": "surface replace", - "path": "folders/shader/surface replace.yy", + "path": "folders/shader/filter/surface replace.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy index a95da44cb..b28dbc138 100644 --- a/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy +++ b/shaders/sh_surface_replace_fast_replace/sh_surface_replace_fast_replace.yy @@ -4,7 +4,7 @@ "name": "sh_surface_replace_fast_replace", "parent": { "name": "surface replace", - "path": "folders/shader/surface replace.yy", + "path": "folders/shader/filter/surface replace.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_surface_replace_find/sh_surface_replace_find.yy b/shaders/sh_surface_replace_find/sh_surface_replace_find.yy index ce3ba397b..3a6bbaffb 100644 --- a/shaders/sh_surface_replace_find/sh_surface_replace_find.yy +++ b/shaders/sh_surface_replace_find/sh_surface_replace_find.yy @@ -4,7 +4,7 @@ "name": "sh_surface_replace_find", "parent": { "name": "surface replace", - "path": "folders/shader/surface replace.yy", + "path": "folders/shader/filter/surface replace.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy index 1e077a026..6908eceaf 100644 --- a/shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy +++ b/shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy @@ -4,7 +4,7 @@ "name": "sh_surface_replace_replace", "parent": { "name": "surface replace", - "path": "folders/shader/surface replace.yy", + "path": "folders/shader/filter/surface replace.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_time_remap/sh_time_remap.yy b/shaders/sh_time_remap/sh_time_remap.yy index 907fc68ab..b0fcc4bca 100644 --- a/shaders/sh_time_remap/sh_time_remap.yy +++ b/shaders/sh_time_remap/sh_time_remap.yy @@ -4,7 +4,7 @@ "name": "sh_time_remap", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_twirl/sh_twirl.yy b/shaders/sh_twirl/sh_twirl.yy index feb16e5bd..1125e2865 100644 --- a/shaders/sh_twirl/sh_twirl.yy +++ b/shaders/sh_twirl/sh_twirl.yy @@ -4,7 +4,7 @@ "name": "sh_twirl", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_warp_4points/sh_warp_4points.yy b/shaders/sh_warp_4points/sh_warp_4points.yy index 2dbe37996..52fd89c32 100644 --- a/shaders/sh_warp_4points/sh_warp_4points.yy +++ b/shaders/sh_warp_4points/sh_warp_4points.yy @@ -4,7 +4,7 @@ "name": "sh_warp_4points", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy index 15afdf55f..b39ecb086 100644 --- a/shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy +++ b/shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy @@ -4,7 +4,7 @@ "name": "sh_warp_4points_pers", "parent": { "name": "warp", - "path": "folders/shader/warp.yy", + "path": "folders/shader/filter/warp.yy", }, "type": 1, } \ No newline at end of file diff --git a/sprites/s_node_path_from_mask/9b0e498f-8e44-42da-b486-c7bc72a59154.png b/sprites/s_node_path_from_mask/9b0e498f-8e44-42da-b486-c7bc72a59154.png new file mode 100644 index 000000000..c02893dd9 Binary files /dev/null and b/sprites/s_node_path_from_mask/9b0e498f-8e44-42da-b486-c7bc72a59154.png differ diff --git a/sprites/s_node_path_from_mask/layers/9b0e498f-8e44-42da-b486-c7bc72a59154/75feb10c-8189-4397-be24-92a884381442.png b/sprites/s_node_path_from_mask/layers/9b0e498f-8e44-42da-b486-c7bc72a59154/75feb10c-8189-4397-be24-92a884381442.png new file mode 100644 index 000000000..c02893dd9 Binary files /dev/null and b/sprites/s_node_path_from_mask/layers/9b0e498f-8e44-42da-b486-c7bc72a59154/75feb10c-8189-4397-be24-92a884381442.png differ diff --git a/sprites/s_node_path_from_mask/s_node_path_from_mask.yy b/sprites/s_node_path_from_mask/s_node_path_from_mask.yy new file mode 100644 index 000000000..51d53ce2b --- /dev/null +++ b/sprites/s_node_path_from_mask/s_node_path_from_mask.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_path_from_mask", + "bbox_bottom": 60, + "bbox_left": 6, + "bbox_right": 57, + "bbox_top": 2, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"9b0e498f-8e44-42da-b486-c7bc72a59154",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"75feb10c-8189-4397-be24-92a884381442","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "path", + "path": "folders/nodes/icons/value/path.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_path_from_mask", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"9b0e498f-8e44-42da-b486-c7bc72a59154","path":"sprites/s_node_path_from_mask/s_node_path_from_mask.yy",},},},"Disabled":false,"id":"db2cf5a3-0299-42c6-9076-5764b9109068","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file