mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 06:04:49 +01:00
Supporter extra nodes
This commit is contained in:
parent
4754830665
commit
18145a5109
37 changed files with 725 additions and 15 deletions
|
@ -532,6 +532,7 @@
|
|||
{"name":"rotatorRange","order":2,"path":"scripts/rotatorRange/rotatorRange.yy",},
|
||||
{"name":"node_3d_mesh_cone","order":6,"path":"scripts/node_3d_mesh_cone/node_3d_mesh_cone.yy",},
|
||||
{"name":"font_loader","order":8,"path":"scripts/font_loader/font_loader.yy",},
|
||||
{"name":"sh_water_caustic","order":36,"path":"shaders/sh_water_caustic/sh_water_caustic.yy",},
|
||||
{"name":"node_iterator_filter_input","order":1,"path":"scripts/node_iterator_filter_input/node_iterator_filter_input.yy",},
|
||||
{"name":"point_rotate","order":1,"path":"scripts/point_rotate/point_rotate.yy",},
|
||||
{"name":"s_node_vfx_variable","order":10,"path":"sprites/s_node_vfx_variable/s_node_vfx_variable.yy",},
|
||||
|
@ -692,6 +693,7 @@
|
|||
{"name":"sh_3d_extrude_filler","order":8,"path":"shaders/sh_3d_extrude_filler/sh_3d_extrude_filler.yy",},
|
||||
{"name":"quarternionBox","order":8,"path":"scripts/quarternionBox/quarternionBox.yy",},
|
||||
{"name":"s_window_exit","order":2,"path":"sprites/s_window_exit/s_window_exit.yy",},
|
||||
{"name":"node_noise_shard","order":12,"path":"scripts/node_noise_shard/node_noise_shard.yy",},
|
||||
{"name":"s_node_color_remove","order":7,"path":"sprites/s_node_color_remove/s_node_color_remove.yy",},
|
||||
{"name":"sh_average","order":7,"path":"shaders/sh_average/sh_average.yy",},
|
||||
{"name":"sh_warp_4points_pers","order":10,"path":"shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy",},
|
||||
|
@ -789,6 +791,7 @@
|
|||
{"name":"o_dialog_textbox_function_guide","order":8,"path":"objects/o_dialog_textbox_function_guide/o_dialog_textbox_function_guide.yy",},
|
||||
{"name":"node_3d_material","order":6,"path":"scripts/node_3d_material/node_3d_material.yy",},
|
||||
{"name":"pcx_server","order":2,"path":"scripts/pcx_server/pcx_server.yy",},
|
||||
{"name":"sh_noise_shard","order":11,"path":"shaders/sh_noise_shard/sh_noise_shard.yy",},
|
||||
{"name":"s_node_array_set","order":9,"path":"sprites/s_node_array_set/s_node_array_set.yy",},
|
||||
{"name":"node_dust","order":19,"path":"scripts/node_dust/node_dust.yy",},
|
||||
{"name":"node_noise_cell","order":2,"path":"scripts/node_noise_cell/node_noise_cell.yy",},
|
||||
|
@ -948,6 +951,7 @@
|
|||
{"name":"node_sprite_stack","order":3,"path":"scripts/node_sprite_stack/node_sprite_stack.yy",},
|
||||
{"name":"s_node_smokeSim_vortex","order":4,"path":"sprites/s_node_smokeSim_vortex/s_node_smokeSim_vortex.yy",},
|
||||
{"name":"s_node_json_file_read","order":11,"path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},
|
||||
{"name":"s_node_wavelet","order":34,"path":"sprites/s_node_wavelet/s_node_wavelet.yy",},
|
||||
{"name":"s_workshop_badge_version","order":3,"path":"sprites/s_workshop_badge_version/s_workshop_badge_version.yy",},
|
||||
{"name":"s_node_palette_shift","order":58,"path":"sprites/s_node_palette_shift/s_node_palette_shift.yy",},
|
||||
{"name":"__strandSim","order":2,"path":"scripts/__strandSim/__strandSim.yy",},
|
||||
|
@ -1254,6 +1258,7 @@
|
|||
{"name":"FirebaseListenerUserFunctions_Firestore","order":2,"path":"scripts/FirebaseListenerUserFunctions_Firestore/FirebaseListenerUserFunctions_Firestore.yy",},
|
||||
{"name":"FirebaseSetup","order":2,"path":"extensions/FirebaseSetup/FirebaseSetup.yy",},
|
||||
{"name":"json_prettify","order":7,"path":"scripts/json_prettify/json_prettify.yy",},
|
||||
{"name":"s_node_caustic","order":35,"path":"sprites/s_node_caustic/s_node_caustic.yy",},
|
||||
{"name":"s_node_loop_output","order":13,"path":"sprites/s_node_loop_output/s_node_loop_output.yy",},
|
||||
{"name":"s_node_smokeSim_domain_queue","order":3,"path":"sprites/s_node_smokeSim_domain_queue/s_node_smokeSim_domain_queue.yy",},
|
||||
{"name":"panel_notification","order":4,"path":"scripts/panel_notification/panel_notification.yy",},
|
||||
|
@ -1353,6 +1358,7 @@
|
|||
{"name":"node_export","order":9,"path":"scripts/node_export/node_export.yy",},
|
||||
{"name":"controlPointBox","order":4,"path":"scripts/controlPointBox/controlPointBox.yy",},
|
||||
{"name":"sh_vertex_pt","order":5,"path":"shaders/sh_vertex_pt/sh_vertex_pt.yy",},
|
||||
{"name":"sh_noise_wavelet","order":12,"path":"shaders/sh_noise_wavelet/sh_noise_wavelet.yy",},
|
||||
{"name":"node_cache_base","order":18,"path":"scripts/node_cache_base/node_cache_base.yy",},
|
||||
{"name":"fd_rectangle_set_velocity_dissipation_type","order":13,"path":"scripts/fd_rectangle_set_velocity_dissipation_type/fd_rectangle_set_velocity_dissipation_type.yy",},
|
||||
{"name":"node_color_replacement","order":3,"path":"scripts/node_color_replacement/node_color_replacement.yy",},
|
||||
|
@ -1375,6 +1381,7 @@
|
|||
{"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":"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",},
|
||||
{"name":"s_node_color_from_rgb","order":5,"path":"sprites/s_node_color_from_rgb/s_node_color_from_rgb.yy",},
|
||||
{"name":"s_node_separate_file_path","order":14,"path":"sprites/s_node_separate_file_path/s_node_separate_file_path.yy",},
|
||||
|
@ -1421,6 +1428,7 @@
|
|||
{"name":"libfilesystem","order":3,"path":"extensions/libfilesystem/libfilesystem.yy",},
|
||||
{"name":"node_channels_hsv","order":1,"path":"scripts/node_channels_hsv/node_channels_hsv.yy",},
|
||||
{"name":"sh_stripe","order":10,"path":"shaders/sh_stripe/sh_stripe.yy",},
|
||||
{"name":"s_node_shard","order":33,"path":"sprites/s_node_shard/s_node_shard.yy",},
|
||||
{"name":"node_path_trim","order":6,"path":"scripts/node_path_trim/node_path_trim.yy",},
|
||||
{"name":"s_node_rigidSim_deactivate","order":7,"path":"sprites/s_node_rigidSim_deactivate/s_node_rigidSim_deactivate.yy",},
|
||||
{"name":"sh_blend_contrast","order":16,"path":"shaders/sh_blend_contrast/sh_blend_contrast.yy",},
|
||||
|
@ -1751,6 +1759,7 @@
|
|||
{"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",},
|
||||
{"name":"node_noise_wavelet","order":13,"path":"scripts/node_noise_wavelet/node_noise_wavelet.yy",},
|
||||
{"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",},
|
||||
{"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},
|
||||
{"name":"s_node_armature_path","order":17,"path":"sprites/s_node_armature_path/s_node_armature_path.yy",},
|
||||
|
|
|
@ -1134,6 +1134,7 @@
|
|||
{"id":{"name":"rotatorRange","path":"scripts/rotatorRange/rotatorRange.yy",},},
|
||||
{"id":{"name":"node_3d_mesh_cone","path":"scripts/node_3d_mesh_cone/node_3d_mesh_cone.yy",},},
|
||||
{"id":{"name":"font_loader","path":"scripts/font_loader/font_loader.yy",},},
|
||||
{"id":{"name":"sh_water_caustic","path":"shaders/sh_water_caustic/sh_water_caustic.yy",},},
|
||||
{"id":{"name":"node_iterator_filter_input","path":"scripts/node_iterator_filter_input/node_iterator_filter_input.yy",},},
|
||||
{"id":{"name":"point_rotate","path":"scripts/point_rotate/point_rotate.yy",},},
|
||||
{"id":{"name":"s_node_vfx_variable","path":"sprites/s_node_vfx_variable/s_node_vfx_variable.yy",},},
|
||||
|
@ -1320,6 +1321,7 @@
|
|||
{"id":{"name":"quarternionBox","path":"scripts/quarternionBox/quarternionBox.yy",},},
|
||||
{"id":{"name":"s_window_exit","path":"sprites/s_window_exit/s_window_exit.yy",},},
|
||||
{"id":{"name":"d3d_gizmo_sphere","path":"scripts/d3d_gizmo_sphere/d3d_gizmo_sphere.yy",},},
|
||||
{"id":{"name":"node_noise_shard","path":"scripts/node_noise_shard/node_noise_shard.yy",},},
|
||||
{"id":{"name":"node_3d_particle","path":"scripts/node_3d_particle/node_3d_particle.yy",},},
|
||||
{"id":{"name":"s_node_color_remove","path":"sprites/s_node_color_remove/s_node_color_remove.yy",},},
|
||||
{"id":{"name":"sh_average","path":"shaders/sh_average/sh_average.yy",},},
|
||||
|
@ -1433,6 +1435,7 @@
|
|||
{"id":{"name":"node_3d_material","path":"scripts/node_3d_material/node_3d_material.yy",},},
|
||||
{"id":{"name":"pcx_server","path":"scripts/pcx_server/pcx_server.yy",},},
|
||||
{"id":{"name":"panel_animation_settings","path":"scripts/panel_animation_settings/panel_animation_settings.yy",},},
|
||||
{"id":{"name":"sh_noise_shard","path":"shaders/sh_noise_shard/sh_noise_shard.yy",},},
|
||||
{"id":{"name":"s_node_array_set","path":"sprites/s_node_array_set/s_node_array_set.yy",},},
|
||||
{"id":{"name":"node_dust","path":"scripts/node_dust/node_dust.yy",},},
|
||||
{"id":{"name":"node_noise_cell","path":"scripts/node_noise_cell/node_noise_cell.yy",},},
|
||||
|
@ -1617,6 +1620,7 @@
|
|||
{"id":{"name":"node_sprite_stack","path":"scripts/node_sprite_stack/node_sprite_stack.yy",},},
|
||||
{"id":{"name":"s_node_smokeSim_vortex","path":"sprites/s_node_smokeSim_vortex/s_node_smokeSim_vortex.yy",},},
|
||||
{"id":{"name":"s_node_json_file_read","path":"sprites/s_node_json_file_read/s_node_json_file_read.yy",},},
|
||||
{"id":{"name":"s_node_wavelet","path":"sprites/s_node_wavelet/s_node_wavelet.yy",},},
|
||||
{"id":{"name":"s_workshop_badge_version","path":"sprites/s_workshop_badge_version/s_workshop_badge_version.yy",},},
|
||||
{"id":{"name":"s_node_palette_shift","path":"sprites/s_node_palette_shift/s_node_palette_shift.yy",},},
|
||||
{"id":{"name":"__strandSim","path":"scripts/__strandSim/__strandSim.yy",},},
|
||||
|
@ -1955,6 +1959,7 @@
|
|||
{"id":{"name":"node_3d_light_directional","path":"scripts/node_3d_light_directional/node_3d_light_directional.yy",},},
|
||||
{"id":{"name":"FirebaseSetup","path":"extensions/FirebaseSetup/FirebaseSetup.yy",},},
|
||||
{"id":{"name":"json_prettify","path":"scripts/json_prettify/json_prettify.yy",},},
|
||||
{"id":{"name":"s_node_caustic","path":"sprites/s_node_caustic/s_node_caustic.yy",},},
|
||||
{"id":{"name":"s_node_loop_output","path":"sprites/s_node_loop_output/s_node_loop_output.yy",},},
|
||||
{"id":{"name":"s_node_smokeSim_domain_queue","path":"sprites/s_node_smokeSim_domain_queue/s_node_smokeSim_domain_queue.yy",},},
|
||||
{"id":{"name":"_p_dialog","path":"objects/_p_dialog/_p_dialog.yy",},},
|
||||
|
@ -2074,6 +2079,7 @@
|
|||
{"id":{"name":"node_export","path":"scripts/node_export/node_export.yy",},},
|
||||
{"id":{"name":"controlPointBox","path":"scripts/controlPointBox/controlPointBox.yy",},},
|
||||
{"id":{"name":"sh_vertex_pt","path":"shaders/sh_vertex_pt/sh_vertex_pt.yy",},},
|
||||
{"id":{"name":"sh_noise_wavelet","path":"shaders/sh_noise_wavelet/sh_noise_wavelet.yy",},},
|
||||
{"id":{"name":"node_cache_base","path":"scripts/node_cache_base/node_cache_base.yy",},},
|
||||
{"id":{"name":"fd_rectangle_set_velocity_dissipation_type","path":"scripts/fd_rectangle_set_velocity_dissipation_type/fd_rectangle_set_velocity_dissipation_type.yy",},},
|
||||
{"id":{"name":"node_color_replacement","path":"scripts/node_color_replacement/node_color_replacement.yy",},},
|
||||
|
@ -2100,6 +2106,7 @@
|
|||
{"id":{"name":"sh_trail_filler_pass2","path":"shaders/sh_trail_filler_pass2/sh_trail_filler_pass2.yy",},},
|
||||
{"id":{"name":"node_PCX_array_set","path":"scripts/node_PCX_array_set/node_PCX_array_set.yy",},},
|
||||
{"id":{"name":"sh_color_select_side","path":"shaders/sh_color_select_side/sh_color_select_side.yy",},},
|
||||
{"id":{"name":"node_caustic","path":"scripts/node_caustic/node_caustic.yy",},},
|
||||
{"id":{"name":"s_node_regex_search","path":"sprites/s_node_regex_search/s_node_regex_search.yy",},},
|
||||
{"id":{"name":"s_node_color_from_rgb","path":"sprites/s_node_color_from_rgb/s_node_color_from_rgb.yy",},},
|
||||
{"id":{"name":"s_node_separate_file_path","path":"sprites/s_node_separate_file_path/s_node_separate_file_path.yy",},},
|
||||
|
@ -2152,6 +2159,7 @@
|
|||
{"id":{"name":"libfilesystem","path":"extensions/libfilesystem/libfilesystem.yy",},},
|
||||
{"id":{"name":"node_channels_hsv","path":"scripts/node_channels_hsv/node_channels_hsv.yy",},},
|
||||
{"id":{"name":"sh_stripe","path":"shaders/sh_stripe/sh_stripe.yy",},},
|
||||
{"id":{"name":"s_node_shard","path":"sprites/s_node_shard/s_node_shard.yy",},},
|
||||
{"id":{"name":"node_path_trim","path":"scripts/node_path_trim/node_path_trim.yy",},},
|
||||
{"id":{"name":"s_node_rigidSim_deactivate","path":"sprites/s_node_rigidSim_deactivate/s_node_rigidSim_deactivate.yy",},},
|
||||
{"id":{"name":"sh_blend_contrast","path":"shaders/sh_blend_contrast/sh_blend_contrast.yy",},},
|
||||
|
@ -2536,6 +2544,7 @@
|
|||
{"id":{"name":"s_node_array_zip","path":"sprites/s_node_array_zip/s_node_array_zip.yy",},},
|
||||
{"id":{"name":"fd_rectangle_get_material_width","path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",},},
|
||||
{"id":{"name":"FirebaseREST_Firestore_collection_query_decode","path":"scripts/FirebaseREST_Firestore_collection_query_decode/FirebaseREST_Firestore_collection_query_decode.yy",},},
|
||||
{"id":{"name":"node_noise_wavelet","path":"scripts/node_noise_wavelet/node_noise_wavelet.yy",},},
|
||||
{"id":{"name":"font_sprite_loader","path":"scripts/font_sprite_loader/font_sprite_loader.yy",},},
|
||||
{"id":{"name":"s_node_draw_atlas","path":"sprites/s_node_draw_atlas/s_node_draw_atlas.yy",},},
|
||||
{"id":{"name":"s_node_noise_aniso","path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},},
|
||||
|
|
|
@ -414,8 +414,8 @@ event_inherited();
|
|||
var group_labels = [];
|
||||
|
||||
var _hoverContent = _hover;
|
||||
if(ADD_NODE_PAGE >= 0 && PREFERENCES.dialog_add_node_grouping)
|
||||
_hoverContent &= _m[1] > ui(8 + 24);
|
||||
//if(ADD_NODE_PAGE >= 0 && PREFERENCES.dialog_add_node_grouping)
|
||||
// _hoverContent &= _m[1] > ui(8 + 24);
|
||||
|
||||
if(PREFERENCES.dialog_add_node_view == 0) { #region grid
|
||||
var grid_size = ui(64);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/// @description
|
||||
active = textbox != noone;
|
||||
active = textbox != noone && array_length(data);
|
||||
if(textbox == noone) exit;
|
||||
if(textbox != WIDGET_CURRENT) exit;
|
||||
if(array_empty(data)) exit;
|
||||
|
|
28
scripts/node_caustic/node_caustic.gml
Normal file
28
scripts/node_caustic/node_caustic.gml
Normal file
|
@ -0,0 +1,28 @@
|
|||
function Node_Caustic(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
||||
name = "Caustic";
|
||||
shader = sh_water_caustic;
|
||||
|
||||
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector)
|
||||
.setUnitRef(function(index) { return getDimension(index); });
|
||||
addShaderProp(SHADER_UNIFORM.float, "position");
|
||||
|
||||
inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||
|
||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||
|
||||
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
addShaderProp(SHADER_UNIFORM.float, "progress");
|
||||
|
||||
inputs[| 5] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.24)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] });
|
||||
addShaderProp(SHADER_UNIFORM.float, "detail");
|
||||
|
||||
input_display_list = [
|
||||
["Output", true], 0,
|
||||
["Noise", false], 1, 2, 4, 5,
|
||||
];
|
||||
}
|
11
scripts/node_caustic/node_caustic.yy
Normal file
11
scripts/node_caustic/node_caustic.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_caustic",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/data/generator.yy",
|
||||
},
|
||||
}
|
12
scripts/node_caustic/node_gradient.yy
Normal file
12
scripts/node_caustic/node_gradient.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/data/generator.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_gradient",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
|
@ -13,9 +13,25 @@ function Node_Gabor_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y
|
|||
|
||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||
|
||||
inputs[| 4] = nodeValue("Density", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 2)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 4, 0.01 ] });
|
||||
addShaderProp(SHADER_UNIFORM.float, "alignment");
|
||||
|
||||
inputs[| 5] = nodeValue("Sharpness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 5, 0.01 ] });
|
||||
addShaderProp(SHADER_UNIFORM.float, "sharpness");
|
||||
|
||||
inputs[| 6] = nodeValue("Augment", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 11, 31 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
addShaderProp(SHADER_UNIFORM.float, "augment");
|
||||
|
||||
inputs[| 7] = nodeValue("Phase", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.setDisplay(VALUE_DISPLAY.rotation);
|
||||
addShaderProp(SHADER_UNIFORM.float, "rotation");
|
||||
|
||||
input_display_list = [
|
||||
["Output", true], 0, 3,
|
||||
["Noise", false], 1, 2,
|
||||
["Noise", false], 1, 2, 4, 7, 5,
|
||||
];
|
||||
}
|
12
scripts/node_noise_shard/node_gradient.yy
Normal file
12
scripts/node_noise_shard/node_gradient.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/data/generator.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_gradient",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
28
scripts/node_noise_shard/node_noise_shard.gml
Normal file
28
scripts/node_noise_shard/node_noise_shard.gml
Normal file
|
@ -0,0 +1,28 @@
|
|||
function Node_Shard_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
||||
name = "Shard Noise";
|
||||
shader = sh_noise_shard;
|
||||
|
||||
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector)
|
||||
.setUnitRef(function(index) { return getDimension(index); });
|
||||
addShaderProp(SHADER_UNIFORM.float, "position");
|
||||
|
||||
inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||
|
||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||
|
||||
inputs[| 4] = nodeValue("Sharpness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] });
|
||||
addShaderProp(SHADER_UNIFORM.float, "sharpness");
|
||||
|
||||
inputs[| 5] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
addShaderProp(SHADER_UNIFORM.float, "progress");
|
||||
|
||||
input_display_list = [
|
||||
["Output", true], 0, 3,
|
||||
["Noise", false], 1, 2, 5, 4,
|
||||
];
|
||||
}
|
11
scripts/node_noise_shard/node_noise_shard.yy
Normal file
11
scripts/node_noise_shard/node_noise_shard.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_noise_shard",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "noise",
|
||||
"path": "folders/nodes/data/generator/noise.yy",
|
||||
},
|
||||
}
|
12
scripts/node_noise_wavelet/node_gradient.yy
Normal file
12
scripts/node_noise_wavelet/node_gradient.yy
Normal file
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/data/generator.yy",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_gradient",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
28
scripts/node_noise_wavelet/node_noise_wavelet.gml
Normal file
28
scripts/node_noise_wavelet/node_noise_wavelet.gml
Normal file
|
@ -0,0 +1,28 @@
|
|||
function Node_Wavelet_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
|
||||
name = "Wavelet Noise";
|
||||
shader = sh_noise_wavelet;
|
||||
|
||||
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector)
|
||||
.setUnitRef(function(index) { return getDimension(index); });
|
||||
addShaderProp(SHADER_UNIFORM.float, "position");
|
||||
|
||||
inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
addShaderProp(SHADER_UNIFORM.float, "scale");
|
||||
|
||||
inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, irandom(99999));
|
||||
addShaderProp(SHADER_UNIFORM.float, "seed");
|
||||
|
||||
inputs[| 4] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
addShaderProp(SHADER_UNIFORM.float, "progress");
|
||||
|
||||
inputs[| 5] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1.24)
|
||||
.setDisplay(VALUE_DISPLAY.slider, { range: [ 0, 2, 0.01 ] });
|
||||
addShaderProp(SHADER_UNIFORM.float, "detail");
|
||||
|
||||
input_display_list = [
|
||||
["Output", true], 0, 3,
|
||||
["Noise", false], 1, 2, 4, 5,
|
||||
];
|
||||
}
|
11
scripts/node_noise_wavelet/node_noise_wavelet.yy
Normal file
11
scripts/node_noise_wavelet/node_noise_wavelet.yy
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"resourceType": "GMScript",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "node_noise_wavelet",
|
||||
"isCompatibility": false,
|
||||
"isDnD": false,
|
||||
"parent": {
|
||||
"name": "noise",
|
||||
"path": "folders/nodes/data/generator/noise.yy",
|
||||
},
|
||||
}
|
|
@ -576,6 +576,9 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
|
|||
addNodeObject(generator, "Anisotropic Noise", s_node_noise_aniso, "Node_Noise_Aniso", [1, Node_Noise_Aniso],, "Generate anisotropic noise.");
|
||||
addNodeObject(generator, "Extra Perlins", s_node_perlin_extra, "Node_Perlin_Extra", [1, Node_Perlin_Extra], ["noise"], "Random perlin noise made with different algorithms.").patreonExtra();
|
||||
addNodeObject(generator, "Gabor Noise", s_node_gabor, "Node_Gabor_Noise", [1, Node_Gabor_Noise]).patreonExtra();
|
||||
addNodeObject(generator, "Shard Noise", s_node_shard, "Node_Shard_Noise", [1, Node_Shard_Noise]).patreonExtra();
|
||||
addNodeObject(generator, "Wavelet Noise", s_node_wavelet, "Node_Wavelet_Noise", [1, Node_Wavelet_Noise]).patreonExtra();
|
||||
addNodeObject(generator, "Caustic", s_node_caustic, "Node_Caustic", [1, Node_Caustic]).patreonExtra();
|
||||
|
||||
ds_list_add(generator, "Patterns");
|
||||
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");
|
||||
|
|
|
@ -505,6 +505,10 @@
|
|||
|
||||
return v1;
|
||||
} #endregion
|
||||
|
||||
static toString = function() { #region
|
||||
return $"[PCX funcTree] \{ symbol: {symbol}, l: {l}, r: {r}\}";
|
||||
} #endregion
|
||||
} #endregion
|
||||
|
||||
function evaluateFunction(fx, params = {}) { #region
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#region symbols
|
||||
global.LOG_EXPRESSION = false;
|
||||
global.LOG_EXPRESSION = true;
|
||||
|
||||
global.EQUATION_PRES = ds_map_create();
|
||||
global.EQUATION_PRES[? "+"] = 1;
|
||||
|
@ -292,7 +292,7 @@
|
|||
} else if (ch == ",") {
|
||||
while(!ds_stack_empty(op)) {
|
||||
var _top = ds_stack_top(op);
|
||||
if(_top == "[" || _top == "(" || (is_array(_top) && _top[0] == "{")) break;
|
||||
if(_top == "[" || _top == "(" || _top == "〚" || (is_array(_top) && _top[0] == "{")) break;
|
||||
|
||||
var _top = ds_stack_pop(op);
|
||||
ds_stack_push(vl, buildFuncTree(_top, vl));
|
||||
|
|
|
@ -167,7 +167,7 @@ function textArea(_input, _onModify) : textInput(_input, _onModify) constructor
|
|||
if(!keyboard_check_pressed(vk_enter))
|
||||
return 0;
|
||||
|
||||
if(use_autocomplete && o_dialog_textbox_autocomplete.textbox == self)
|
||||
if(use_autocomplete && o_dialog_textbox_autocomplete.active && o_dialog_textbox_autocomplete.textbox == self)
|
||||
return 0;
|
||||
|
||||
return 1 + ((shift_new_line && key_mod_press(SHIFT)) || (!shift_new_line && !key_mod_press(SHIFT)));
|
||||
|
|
|
@ -6,22 +6,27 @@ varying vec2 v_vTexcoord;
|
|||
varying vec4 v_vColour;
|
||||
|
||||
uniform float seed;
|
||||
uniform float alignment;
|
||||
uniform float sharpness;
|
||||
uniform float rotation;
|
||||
uniform vec2 u_resolution;
|
||||
uniform vec2 position;
|
||||
uniform vec2 scale;
|
||||
uniform vec2 augment;
|
||||
|
||||
vec2 hash(vec2 p) { return fract(sin(vec2(
|
||||
dot(p, vec2(127.1, 311.7)) * (152.6178612 + seed / 10000.),
|
||||
dot(p, vec2(269.5, 183.3)) * (437.5453123 + seed / 10000.)
|
||||
dot(p, vec2(127.1324, 311.7874)) * (152.6178612 + seed / 10000.),
|
||||
dot(p, vec2(269.8355, 183.3961)) * (437.5453123 + seed / 10000.)
|
||||
)) * 43758.5453); }
|
||||
|
||||
vec3 gabor_wave(in vec2 p) {
|
||||
vec2 ip = floor(p);
|
||||
vec2 fp = fract(p);
|
||||
|
||||
const float fr = 2.0 * 6.283185;
|
||||
const float fa = 4.0;
|
||||
|
||||
float fa = sharpness;
|
||||
float fr = alignment * 6.283185;
|
||||
float rt = radians(rotation);
|
||||
|
||||
vec3 av = vec3(0.0, 0.0, 0.0);
|
||||
vec3 at = vec3(0.0, 0.0, 0.0);
|
||||
|
||||
|
@ -31,12 +36,12 @@ vec3 gabor_wave(in vec2 p) {
|
|||
vec2 h = hash(ip + o);
|
||||
vec2 r = fp - (o + h);
|
||||
|
||||
vec2 k = normalize(-1.0 + 2.0 * hash(ip + o + vec2(11., 31.)) );
|
||||
vec2 k = normalize(-1.0 + 2.0 * hash(ip + o + augment) );
|
||||
|
||||
float d = dot(r, r);
|
||||
float l = dot(r, k);
|
||||
float l = dot(r, k) + rt;
|
||||
float w = exp(-fa * d);
|
||||
vec2 cs = vec2( cos(fr * l), sin(fr * l) );
|
||||
vec2 cs = vec2( cos(fr * l + rt), sin(fr * l + rt) );
|
||||
|
||||
av += w * vec3(cs.x, -2.0 * fa * r * cs.x - cs.y * fr * k );
|
||||
at += w * vec3(1.0, -2.0 * fa * r);
|
||||
|
|
56
shaders/sh_noise_shard/sh_noise_shard.fsh
Normal file
56
shaders/sh_noise_shard/sh_noise_shard.fsh
Normal file
|
@ -0,0 +1,56 @@
|
|||
//Shard noise
|
||||
//By ENDESGA
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform float seed;
|
||||
uniform float progress;
|
||||
uniform float sharpness;
|
||||
uniform vec2 u_resolution;
|
||||
uniform vec2 position;
|
||||
uniform vec2 scale;
|
||||
|
||||
#define tau 6.283185307179586
|
||||
|
||||
vec3 hash(vec3 p) { return fract(sin(vec3(
|
||||
dot(p, vec3(127.1324, 311.7874, 829.3683)) * (152.6178612 + seed / 10000.),
|
||||
dot(p, vec3(269.8355, 183.3961, 614.5965)) * (437.5453123 + seed / 10000.),
|
||||
dot(p, vec3(615.2689, 264.1657, 278.1687)) * (962.6718165 + seed / 10000.)
|
||||
)) * 43758.5453); }
|
||||
|
||||
float shard_noise(in vec3 p, in float sharpness) {
|
||||
vec3 ip = floor(p);
|
||||
vec3 fp = fract(p);
|
||||
|
||||
float v = 0., t = 0.;
|
||||
|
||||
for (int z = -1; z <= 1; z++)
|
||||
for (int y = -1; y <= 1; y++)
|
||||
for (int x = -1; x <= 1; x++) {
|
||||
vec3 o = vec3(x, y, z);
|
||||
vec3 io = ip + o;
|
||||
vec3 h = hash(io);
|
||||
vec3 r = fp - (o + h);
|
||||
|
||||
float w = exp2(-tau*dot(r, r));
|
||||
|
||||
// tanh deconstruction and optimization by @Xor
|
||||
float s = sharpness * dot(r, hash(io + vec3(11, 31, 47)) - 0.5);
|
||||
v += w * s * inversesqrt(1.0 + s * s);
|
||||
t += w;
|
||||
}
|
||||
|
||||
return ((v / t) * .5) + .5;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 pos = v_vTexcoord;
|
||||
pos.x *= (u_resolution.x / u_resolution.y);
|
||||
pos = (pos + position) * scale / 16.;
|
||||
|
||||
float prog = progress / 100.;
|
||||
vec3 uv = vec3( pos + prog, prog * .5 );
|
||||
|
||||
gl_FragColor = vec4( vec3(shard_noise(16.0 * uv, pow(sharpness, 2.) * 20.)), 1. );
|
||||
}
|
19
shaders/sh_noise_shard/sh_noise_shard.vsh
Normal file
19
shaders/sh_noise_shard/sh_noise_shard.vsh
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_noise_shard/sh_noise_shard.yy
Normal file
10
shaders/sh_noise_shard/sh_noise_shard.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_noise_shard",
|
||||
"parent": {
|
||||
"name": "noise",
|
||||
"path": "folders/shader/generator/noise.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
47
shaders/sh_noise_wavelet/sh_noise_wavelet.fsh
Normal file
47
shaders/sh_noise_wavelet/sh_noise_wavelet.fsh
Normal file
|
@ -0,0 +1,47 @@
|
|||
// "Wavelet Noise"
|
||||
// The MIT License
|
||||
// Copyright © 2020 Martijn Steinrucken
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
// Email: countfrolic@gmail.com
|
||||
// Twitter: @The_ArtOfCode
|
||||
// YouTube: youtube.com/TheArtOfCodeIsCool
|
||||
// Facebook: https://www.facebook.com/groups/theartofcode/
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform float seed;
|
||||
uniform float progress;
|
||||
uniform float detail;
|
||||
uniform vec2 u_resolution;
|
||||
uniform vec2 position;
|
||||
uniform vec2 scale;
|
||||
|
||||
float WaveletNoise(vec2 p, float z, float k) {
|
||||
float d = 0., s = 1., m = 0., a;
|
||||
|
||||
for(float i = 0.; i < 4.; i++) {
|
||||
vec2 q = p * s;
|
||||
vec2 g = fract(floor(q) * vec2(123.34 + seed, 233.53 + seed));
|
||||
|
||||
g += dot(g, g + 23.234);
|
||||
a = fract(g.x * g.y) * 0.0001 + z * (mod(g.x + g.y, 2.) - 1.); // add vorticity
|
||||
q = (fract(q) - .5) * mat2(cos(a), -sin(a), sin(a), cos(a));
|
||||
d += sin(q.x * 10. + z) * smoothstep(.25, .0, dot(q, q)) / s;
|
||||
p = p * mat2(.54, -.84, .84, .54) + i;
|
||||
m += 1. / s;
|
||||
s *= k;
|
||||
}
|
||||
return d / m;
|
||||
}
|
||||
|
||||
void main() {
|
||||
vec2 pos = v_vTexcoord - .5;
|
||||
pos.x *= (u_resolution.x / u_resolution.y);
|
||||
pos = (pos + position) * scale / 16.;
|
||||
|
||||
vec3 col = vec3(0.);
|
||||
col += WaveletNoise(pos * 5., (2.9864 + progress), detail) * .5 + .5;
|
||||
|
||||
gl_FragColor = vec4(col, 1.0);
|
||||
}
|
19
shaders/sh_noise_wavelet/sh_noise_wavelet.vsh
Normal file
19
shaders/sh_noise_wavelet/sh_noise_wavelet.vsh
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_noise_wavelet/sh_noise_wavelet.yy
Normal file
10
shaders/sh_noise_wavelet/sh_noise_wavelet.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_noise_wavelet",
|
||||
"parent": {
|
||||
"name": "noise",
|
||||
"path": "folders/shader/generator/noise.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
99
shaders/sh_water_caustic/sh_water_caustic.fsh
Normal file
99
shaders/sh_water_caustic/sh_water_caustic.fsh
Normal file
|
@ -0,0 +1,99 @@
|
|||
//Caustic noise by jaybird
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform float seed;
|
||||
uniform float progress;
|
||||
uniform float detail;
|
||||
uniform vec2 u_resolution;
|
||||
uniform vec2 position;
|
||||
uniform vec2 scale;
|
||||
|
||||
#region noise
|
||||
vec4 mod289(vec4 x) { return x - floor(x / 289.0) * 289.0; }
|
||||
vec4 permute(vec4 x) { return mod289((x * 34.0 + 1.0) * x); }
|
||||
|
||||
vec4 snoise(vec3 v) {
|
||||
const vec2 C = vec2(1.0 / 6.0, 1.0 / 3.0);
|
||||
|
||||
// First corner
|
||||
vec3 i = floor(v + dot(v, vec3(C.y)));
|
||||
vec3 x0 = v - i + dot(i, vec3(C.x));
|
||||
|
||||
// Other corners
|
||||
vec3 g = step(x0.yzx, x0.xyz);
|
||||
vec3 l = 1.0 - g;
|
||||
vec3 i1 = min(g.xyz, l.zxy);
|
||||
vec3 i2 = max(g.xyz, l.zxy);
|
||||
|
||||
vec3 x1 = x0 - i1 + C.x;
|
||||
vec3 x2 = x0 - i2 + C.y;
|
||||
vec3 x3 = x0 - 0.5;
|
||||
|
||||
// Permutations
|
||||
vec4 p =
|
||||
permute(permute(permute(i.z + vec4(0.0, i1.z, i2.z, 1.0))
|
||||
+ i.y + vec4(0.0, i1.y, i2.y, 1.0))
|
||||
+ i.x + vec4(0.0, i1.x, i2.x, 1.0));
|
||||
|
||||
// Gradients: 7x7 points over a square, mapped onto an octahedron.
|
||||
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)
|
||||
vec4 j = p - 49.0 * floor(p / 49.0); // mod(p,7*7)
|
||||
|
||||
vec4 x_ = floor(j / 7.0);
|
||||
vec4 y_ = floor(j - 7.0 * x_);
|
||||
|
||||
vec4 x = (x_ * 2.0 + 0.5) / 7.0 - 1.0;
|
||||
vec4 y = (y_ * 2.0 + 0.5) / 7.0 - 1.0;
|
||||
|
||||
vec4 h = 1.0 - abs(x) - abs(y);
|
||||
|
||||
vec4 b0 = vec4(x.xy, y.xy);
|
||||
vec4 b1 = vec4(x.zw, y.zw);
|
||||
|
||||
vec4 s0 = floor(b0) * 2.0 + 1.0;
|
||||
vec4 s1 = floor(b1) * 2.0 + 1.0;
|
||||
vec4 sh = -step(h, vec4(0.0));
|
||||
|
||||
vec4 a0 = b0.xzyw + s0.xzyw * sh.xxyy;
|
||||
vec4 a1 = b1.xzyw + s1.xzyw * sh.zzww;
|
||||
|
||||
vec3 g0 = vec3(a0.xy, h.x);
|
||||
vec3 g1 = vec3(a0.zw, h.y);
|
||||
vec3 g2 = vec3(a1.xy, h.z);
|
||||
vec3 g3 = vec3(a1.zw, h.w);
|
||||
|
||||
// Compute noise and gradient at P
|
||||
vec4 m = max(0.6 - vec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0);
|
||||
vec4 m2 = m * m;
|
||||
vec4 m3 = m2 * m;
|
||||
vec4 m4 = m2 * m2;
|
||||
vec3 grad =
|
||||
-6.0 * m3.x * x0 * dot(x0, g0) + m4.x * g0 +
|
||||
-6.0 * m3.y * x1 * dot(x1, g1) + m4.y * g1 +
|
||||
-6.0 * m3.z * x2 * dot(x2, g2) + m4.z * g2 +
|
||||
-6.0 * m3.w * x3 * dot(x3, g3) + m4.w * g3;
|
||||
vec4 px = vec4(dot(x0, g0), dot(x1, g1), dot(x2, g2), dot(x3, g3));
|
||||
return 42.0 * vec4(grad, dot(m4, px));
|
||||
}
|
||||
#endregion
|
||||
|
||||
void main() {
|
||||
vec2 p = v_vTexcoord - .5;
|
||||
p.x *= (u_resolution.x / u_resolution.y);
|
||||
p = (p + position) * scale / 2.;
|
||||
|
||||
vec3 pos = vec3(p.x, progress, p.y);
|
||||
vec4 n = snoise( pos );
|
||||
|
||||
pos -= 0.07 * n.xyz;
|
||||
n = snoise( pos );
|
||||
|
||||
pos -= 0.07 * n.xyz;
|
||||
n = snoise( pos );
|
||||
|
||||
// noise [-1..+1] -> color
|
||||
float intensity = exp(n.w * 3. - 1.5);
|
||||
gl_FragColor = vec4(vec3(intensity), 1.);
|
||||
}
|
19
shaders/sh_water_caustic/sh_water_caustic.vsh
Normal file
19
shaders/sh_water_caustic/sh_water_caustic.vsh
Normal file
|
@ -0,0 +1,19 @@
|
|||
//
|
||||
// Simple passthrough vertex shader
|
||||
//
|
||||
attribute vec3 in_Position; // (x,y,z)
|
||||
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
|
||||
attribute vec4 in_Colour; // (r,g,b,a)
|
||||
attribute vec2 in_TextureCoord; // (u,v)
|
||||
|
||||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
|
||||
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
|
||||
|
||||
v_vColour = in_Colour;
|
||||
v_vTexcoord = in_TextureCoord;
|
||||
}
|
10
shaders/sh_water_caustic/sh_water_caustic.yy
Normal file
10
shaders/sh_water_caustic/sh_water_caustic.yy
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"resourceType": "GMShader",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "sh_water_caustic",
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/shader/generator.yy",
|
||||
},
|
||||
"type": 1,
|
||||
}
|
BIN
sprites/s_node_caustic/611b4e09-5b35-4f71-9cf6-5b44a68648c6.png
Normal file
BIN
sprites/s_node_caustic/611b4e09-5b35-4f71-9cf6-5b44a68648c6.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
74
sprites/s_node_caustic/s_node_caustic.yy
Normal file
74
sprites/s_node_caustic/s_node_caustic.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_caustic",
|
||||
"bbox_bottom": 63,
|
||||
"bbox_left": 0,
|
||||
"bbox_right": 63,
|
||||
"bbox_top": 0,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"611b4e09-5b35-4f71-9cf6-5b44a68648c6",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"99a9fea1-d45d-4593-bad2-24a9b95be120","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/icons/generator.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_caustic",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"611b4e09-5b35-4f71-9cf6-5b44a68648c6","path":"sprites/s_node_caustic/s_node_caustic.yy",},},},"Disabled":false,"id":"8b99f6db-2df3-42ae-8149-9bca16fa4934","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,
|
||||
}
|
BIN
sprites/s_node_shard/36d6f6f3-f701-4ef8-9a0a-29710ccc58de.png
Normal file
BIN
sprites/s_node_shard/36d6f6f3-f701-4ef8-9a0a-29710ccc58de.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
74
sprites/s_node_shard/s_node_shard.yy
Normal file
74
sprites/s_node_shard/s_node_shard.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_shard",
|
||||
"bbox_bottom": 63,
|
||||
"bbox_left": 0,
|
||||
"bbox_right": 63,
|
||||
"bbox_top": 0,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"36d6f6f3-f701-4ef8-9a0a-29710ccc58de",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"1c21ba1f-decf-4ef5-a7f7-4d930da8b6fa","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/icons/generator.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_shard",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"36d6f6f3-f701-4ef8-9a0a-29710ccc58de","path":"sprites/s_node_shard/s_node_shard.yy",},},},"Disabled":false,"id":"7d558a39-9d18-4e30-a9cb-3fb2c9bc7b1d","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,
|
||||
}
|
BIN
sprites/s_node_wavelet/d9547083-0d8e-4682-9fef-b32aa1cc2d80.png
Normal file
BIN
sprites/s_node_wavelet/d9547083-0d8e-4682-9fef-b32aa1cc2d80.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.9 KiB |
74
sprites/s_node_wavelet/s_node_wavelet.yy
Normal file
74
sprites/s_node_wavelet/s_node_wavelet.yy
Normal file
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
"resourceType": "GMSprite",
|
||||
"resourceVersion": "1.0",
|
||||
"name": "s_node_wavelet",
|
||||
"bbox_bottom": 63,
|
||||
"bbox_left": 0,
|
||||
"bbox_right": 63,
|
||||
"bbox_top": 0,
|
||||
"bboxMode": 0,
|
||||
"collisionKind": 1,
|
||||
"collisionTolerance": 0,
|
||||
"DynamicTexturePage": false,
|
||||
"edgeFiltering": false,
|
||||
"For3D": false,
|
||||
"frames": [
|
||||
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"d9547083-0d8e-4682-9fef-b32aa1cc2d80",},
|
||||
],
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"height": 64,
|
||||
"HTile": false,
|
||||
"layers": [
|
||||
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"a9920691-60ec-4d4e-a7db-3e5c529dfc36","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"origin": 4,
|
||||
"parent": {
|
||||
"name": "generator",
|
||||
"path": "folders/nodes/icons/generator.yy",
|
||||
},
|
||||
"preMultiplyAlpha": false,
|
||||
"sequence": {
|
||||
"resourceType": "GMSequence",
|
||||
"resourceVersion": "1.4",
|
||||
"name": "s_node_wavelet",
|
||||
"autoRecord": true,
|
||||
"backdropHeight": 768,
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropImagePath": "",
|
||||
"backdropWidth": 1366,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"eventStubScript": null,
|
||||
"eventToFunction": {},
|
||||
"length": 1.0,
|
||||
"lockOrigin": false,
|
||||
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||
"playback": 1,
|
||||
"playbackSpeed": 30.0,
|
||||
"playbackSpeedType": 0,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"timeUnits": 1,
|
||||
"tracks": [
|
||||
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"d9547083-0d8e-4682-9fef-b32aa1cc2d80","path":"sprites/s_node_wavelet/s_node_wavelet.yy",},},},"Disabled":false,"id":"89b2c3da-1167-4ff7-a145-df1202f2a83f","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"volume": 1.0,
|
||||
"xorigin": 32,
|
||||
"yorigin": 32,
|
||||
},
|
||||
"swatchColours": null,
|
||||
"swfPrecision": 2.525,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"type": 0,
|
||||
"VTile": false,
|
||||
"width": 64,
|
||||
}
|
Loading…
Add table
Reference in a new issue