diff --git a/objects/o_dialog_image_array_edit/Draw_64.gml b/objects/o_dialog_image_array_edit/Draw_64.gml index aa9c9a4eb..8db3e4f18 100644 --- a/objects/o_dialog_image_array_edit/Draw_64.gml +++ b/objects/o_dialog_image_array_edit/Draw_64.gml @@ -29,7 +29,7 @@ if !target exit; var by = dialog_y + ui(18); if(buttonInstant(THEME.button_hide, bx, by, bw, bh, mouse_ui, sFOCUS, sHOVER, __txt("Add") + "...", THEME.add,, COLORS._main_value_positive) == 2) { - var path = get_open_filenames_compat(".png", ""); + var path = get_open_filenames_compat("image|*.png;*.jpg", ""); key_release(); if(path != "") { var paths = paths_to_array(path); diff --git a/objects/o_dialog_palette/Draw_64.gml b/objects/o_dialog_palette/Draw_64.gml index 08642a2b2..6ccffb62b 100644 --- a/objects/o_dialog_palette/Draw_64.gml +++ b/objects/o_dialog_palette/Draw_64.gml @@ -185,7 +185,7 @@ if palette == 0 exit; bx = content_x + ui(18); if(buttonInstant(THEME.button, bx, by, ui(28), ui(28), mouse_ui, interactable && sFOCUS, sHOVER, __txtx("palette_editor_load", "Load palette file") + " (.hex)", THEME.file) == 2) { - var path = get_open_filename(".hex", ""); + var path = get_open_filename("HEX palette|*.hex", ""); key_release(); if(isPaletteFile(path)) { diff --git a/scripts/__node_3d_export/__node_3d_export.gml b/scripts/__node_3d_export/__node_3d_export.gml index 0efdb013a..ce948dada 100644 --- a/scripts/__node_3d_export/__node_3d_export.gml +++ b/scripts/__node_3d_export/__node_3d_export.gml @@ -5,7 +5,7 @@ function __Node_3D_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constru .setVisible(true, true); inputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "", "Export location without '.obj' extension." ) - .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.obj" }); + .setDisplay(VALUE_DISPLAY.path_save, { filter: "3d object|*.obj" }); inputs[| 2] = nodeValue("Export texture", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true ); diff --git a/scripts/__node_3d_obj/__node_3d_obj.gml b/scripts/__node_3d_obj/__node_3d_obj.gml index d5b110b18..459a4f843 100644 --- a/scripts/__node_3d_obj/__node_3d_obj.gml +++ b/scripts/__node_3d_obj/__node_3d_obj.gml @@ -2,7 +2,7 @@ function __Node_3D_Obj(_x, _y, _group = noone) : Node(_x, _y, _group) constructo name = "3D Object"; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.obj" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "3d object|*.obj" }) .rejectArray(); inputs[| 1] = nodeValue("Generate", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) diff --git a/scripts/d3d_light_directional/d3d_light_directional.gml b/scripts/d3d_light_directional/d3d_light_directional.gml index 59f994eef..dfd765c50 100644 --- a/scripts/d3d_light_directional/d3d_light_directional.gml +++ b/scripts/d3d_light_directional/d3d_light_directional.gml @@ -52,7 +52,7 @@ function __3dLightDirectional() : __3dLight() constructor { } #endregion static shadowProjectBegin = function() { #region - shadow_map = surface_verify(shadow_map, shadow_map_size, shadow_map_size, surface_r32float); + shadow_map = surface_verify(shadow_map, shadow_map_size, shadow_map_size, OS == os_macosx? surface_rgba8unorm : surface_r32float); shadow_map_view = matrix_build_lookat(transform.position.x, transform.position.y, transform.position.z, 0, 0, 0, 0, 0, -1); shadow_map_proj = matrix_build_projection_ortho(shadow_map_scale, shadow_map_scale, .01, 100); diff --git a/scripts/d3d_scene/d3d_scene.gml b/scripts/d3d_scene/d3d_scene.gml index 7e25b26be..c1971d8aa 100644 --- a/scripts/d3d_scene/d3d_scene.gml +++ b/scripts/d3d_scene/d3d_scene.gml @@ -236,17 +236,21 @@ function __3dScene(camera, name = "New scene") constructor { shader_set_f("light_pnt_color", lightPnt_color); shader_set_f("light_pnt_intensity", lightPnt_intensity); shader_set_f("light_pnt_radius", lightPnt_radius); + shader_set_i("light_pnt_shadow_active", lightPnt_shadow); - for( var i = 0, n = array_length(lightPnt_shadowMap); i < n; i++ ) { - var _sid = shader_set_surface($"light_pnt_shadowmap_{i}", lightPnt_shadowMap[i], true, true); - gpu_set_tex_repeat_ext(_sid, false); + + if(OS == os_windows) { + for( var i = 0, n = array_length(lightPnt_shadowMap); i < n; i++ ) { + var _sid = shader_set_surface($"light_pnt_shadowmap_{i}", lightPnt_shadowMap[i], true, true); + gpu_set_tex_repeat_ext(_sid, false); + } + shader_set_f("light_pnt_view", lightPnt_viewMat); + shader_set_f("light_pnt_proj", lightPnt_projMat); + shader_set_f("light_pnt_shadow_bias", lightPnt_shadowBias); } - shader_set_f("light_pnt_view", lightPnt_viewMat); - shader_set_f("light_pnt_proj", lightPnt_projMat); - shader_set_f("light_pnt_shadow_bias", lightPnt_shadowBias); } #endregion - if(defer_normal && deferData != noone && array_length(deferData.geometry_data) > 2) { + if(OS == os_windows && defer_normal && deferData != noone && array_length(deferData.geometry_data) > 2) { shader_set_i("mat_defer_normal", 1); shader_set_surface("mat_normal_map", deferData.geometry_data[2]); } else @@ -303,7 +307,7 @@ function __3dScene(camera, name = "New scene") constructor { array_push(lightPnt_intensity, light.intensity); array_push(lightPnt_radius, light.radius); - array_push(lightPnt_shadow, light.shadow_active); + array_push(lightPnt_shadow, OS == os_windows && light.shadow_active); if(light.shadow_active) { if(lightPnt_shadow_count < lightPnt_shadow_max) { diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index 610291ddb..f497d1f8b 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -110,6 +110,24 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc lb_w += ui(24); } #endregion + if(!jun.active) { + draw_set_text(_font, fa_left, fa_center, COLORS._main_text_sub_inner); + draw_text_add(lb_x, lb_y - ui(2), _name); + + if(jun.active_tooltip != "") { + var tx = xx + ui(40) + string_width(_name) + ui(16); + var ty = lb_y - ui(1); + + if(point_in_circle(_m[0], _m[1], tx, ty, ui(10))) { + TOOLTIP = jun.active_tooltip; + draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 1); + } else + draw_sprite_ui(THEME.info, 0, tx, ty,,,, COLORS._main_icon_light, 0.75); + } + + return [ 0, true ]; + } + draw_text_add(lb_x, lb_y - ui(2), _name); #region tooltip diff --git a/scripts/node_3d_camera/node_3d_camera.gml b/scripts/node_3d_camera/node_3d_camera.gml index 364d4a21f..9bce95aee 100644 --- a/scripts/node_3d_camera/node_3d_camera.gml +++ b/scripts/node_3d_camera/node_3d_camera.gml @@ -72,7 +72,8 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group) inputs[| in_d3d + 20] = nodeValue("AO Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1. ) .setDisplay(VALUE_DISPLAY.slider, { range: [ 0.01, 4, 0.01 ] }); - inputs[| in_d3d + 21] = nodeValue("Round Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ); + inputs[| in_d3d + 21] = nodeValue("Round Normal", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) + .setWindows(); in_cam = ds_list_size(inputs); diff --git a/scripts/node_3d_light_point/node_3d_light_point.gml b/scripts/node_3d_light_point/node_3d_light_point.gml index b45a22d5c..e7aafa100 100644 --- a/scripts/node_3d_light_point/node_3d_light_point.gml +++ b/scripts/node_3d_light_point/node_3d_light_point.gml @@ -5,11 +5,14 @@ function Node_3D_Light_Point(_x, _y, _group = noone) : Node_3D_Light(_x, _y, _gr inputs[| in_light + 0] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4) - inputs[| in_light + 1] = nodeValue("Cast Shadow", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + inputs[| in_light + 1] = nodeValue("Cast Shadow", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) + .setWindows(); - inputs[| in_light + 2] = nodeValue("Shadow Map Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1024); + inputs[| in_light + 2] = nodeValue("Shadow Map Size", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1024) + .setWindows(); - inputs[| in_light + 3] = nodeValue("Shadow Bias", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .001); + inputs[| in_light + 3] = nodeValue("Shadow Bias", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, .001) + .setWindows(); input_display_list = [ ["Transform", false], 0, diff --git a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml index 0d8d23746..e64d5faa5 100644 --- a/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml +++ b/scripts/node_3d_mesh_obj/node_3d_mesh_obj.gml @@ -1,7 +1,7 @@ function Node_create_3D_Obj(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".obj", ""); + path = get_open_filename("30 object|*.obj", ""); key_release(); if(path == "") return noone; } @@ -26,7 +26,7 @@ function Node_3D_Mesh_Obj(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, _group) object_class = __3dObject; inputs[| in_mesh + 0] = nodeValue("File Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "" ) - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.obj" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "3d object|*.obj" }) .rejectArray(); inputs[| in_mesh + 1] = nodeValue("Flip UV", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true, "Flip UV axis, can be use to fix some texture mapping error.") diff --git a/scripts/node_3d_transform_image/node_3d_transform_image.gml b/scripts/node_3d_transform_image/node_3d_transform_image.gml index 99d95b480..3c2a9cc1e 100644 --- a/scripts/node_3d_transform_image/node_3d_transform_image.gml +++ b/scripts/node_3d_transform_image/node_3d_transform_image.gml @@ -103,7 +103,7 @@ function Node_3D_Transform_Image(_x, _y, _group = noone) : Node_3D_Mesh(_x, _y, if(!previewable) return; var _surf = outputs[| 1].getValue(); - if(is_array(_surf)) _surf = array_safe_get(_surf[preview_index]); + if(is_array(_surf)) _surf = array_safe_get(_surf, preview_index); if(!is_surface(_surf)) return; var bbox = drawGetBbox(xx, yy, _s); diff --git a/scripts/node_ase_file_read/node_ase_file_read.gml b/scripts/node_ase_file_read/node_ase_file_read.gml index abcd8f045..f9f8ce9ee 100644 --- a/scripts/node_ase_file_read/node_ase_file_read.gml +++ b/scripts/node_ase_file_read/node_ase_file_read.gml @@ -1,7 +1,7 @@ function Node_create_ASE_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".ase", ""); + path = get_open_filename("aseprite|*.ase", ""); key_release(); if(path == "") return noone; } @@ -30,7 +30,7 @@ function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.ase, *.aseprite" }); + .setDisplay(VALUE_DISPLAY.path_load, { filter: "Aseprite file|*.ase;*.aseprite" }); inputs[| 1] = nodeValue("Generate layers", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) .setDisplay(VALUE_DISPLAY.button, { name: "Generate", onClick: function() { refreshLayers(); } }); diff --git a/scripts/node_csv_file_read/node_csv_file_read.gml b/scripts/node_csv_file_read/node_csv_file_read.gml index 29ccc1810..3cd27f6aa 100644 --- a/scripts/node_csv_file_read/node_csv_file_read.gml +++ b/scripts/node_csv_file_read/node_csv_file_read.gml @@ -1,7 +1,7 @@ function Node_create_CSV_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".csv", ""); + path = get_open_filename("comma separated value|*.csv", ""); key_release(); if(path == "") return noone; } @@ -30,7 +30,7 @@ function Node_CSV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.csv" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "CSV file|*.csv" }) .rejectArray(); inputs[| 1] = nodeValue("Convert to number", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false) diff --git a/scripts/node_csv_file_write/node_csv_file_write.gml b/scripts/node_csv_file_write/node_csv_file_write.gml index 9e4b92eab..4ea38081f 100644 --- a/scripts/node_csv_file_write/node_csv_file_write.gml +++ b/scripts/node_csv_file_write/node_csv_file_write.gml @@ -15,7 +15,7 @@ function Node_CSV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.csv" }) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "csv file|*.csv" }) .rejectArray(); inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, "") diff --git a/scripts/node_display_image/node_display_image.gml b/scripts/node_display_image/node_display_image.gml index cb73b1077..fab349fd5 100644 --- a/scripts/node_display_image/node_display_image.gml +++ b/scripts/node_display_image/node_display_image.gml @@ -1,7 +1,7 @@ function Node_create_Display_Image(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".png", ""); + path = get_open_filename("image|*.png;*.jpg", ""); key_release(); if(path == "") return noone; } @@ -28,7 +28,7 @@ function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) const inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setVisible(false) - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.png" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }) .rejectArray(); inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ x, y ]) diff --git a/scripts/node_image/node_image.gml b/scripts/node_image/node_image.gml index faddafb7d..3ff7dff13 100644 --- a/scripts/node_image/node_image.gml +++ b/scripts/node_image/node_image.gml @@ -1,7 +1,7 @@ function Node_create_Image(_x, _y, _group = noone) { var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".png", ""); + path = get_open_filename("image|*.png;*.jpg", ""); key_release(); if(path == "") return noone; } @@ -26,7 +26,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { color = COLORS.node_blend_input; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.png" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "image|*.png;*.jpg" }) .rejectArray(); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) diff --git a/scripts/node_image_animated/node_image_animated.gml b/scripts/node_image_animated/node_image_animated.gml index 58fda37cc..85f00cd79 100644 --- a/scripts/node_image_animated/node_image_animated.gml +++ b/scripts/node_image_animated/node_image_animated.gml @@ -1,7 +1,7 @@ function Node_create_Image_Animated(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filenames_compat(".png", ""); + path = get_open_filenames_compat("image|*.png;*.jpg", ""); key_release(); if(path == "") return noone; } @@ -38,7 +38,7 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons update_on_frame = true; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) - .setDisplay(VALUE_DISPLAY.path_array, { filter: ["*.png", ""] }); + .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) diff --git a/scripts/node_image_gif/node_image_gif.gml b/scripts/node_image_gif/node_image_gif.gml index 8a4d49823..f1c6a9d47 100644 --- a/scripts/node_image_gif/node_image_gif.gml +++ b/scripts/node_image_gif/node_image_gif.gml @@ -1,7 +1,7 @@ function Node_create_Image_gif(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".gif", ""); + path = get_open_filename("animated gif|*.gif", ""); key_release(); if(path == "") return noone; } @@ -29,7 +29,7 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct update_on_frame = true; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.gif" }); + .setDisplay(VALUE_DISPLAY.path_load, { filter: "Animated gif|*.gif" }); inputs[| 1] = nodeValue("Set animation length to gif", self, JUNCTION_CONNECT.input, VALUE_TYPE.trigger, 0) .setDisplay(VALUE_DISPLAY.button, { name: "Match length", onClick: function() { diff --git a/scripts/node_image_sequence/node_image_sequence.gml b/scripts/node_image_sequence/node_image_sequence.gml index cc0ed5d63..2c8f77c6b 100644 --- a/scripts/node_image_sequence/node_image_sequence.gml +++ b/scripts/node_image_sequence/node_image_sequence.gml @@ -1,7 +1,7 @@ function Node_create_Image_Sequence(_x, _y, _group = noone) { var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filenames_compat(".png", ""); + path = get_open_filenames_compat("image|*.png;*.jpg", ""); key_release(); if(path == "") return noone; } @@ -37,7 +37,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons color = COLORS.node_blend_input; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) - .setDisplay(VALUE_DISPLAY.path_array, { filter: ["*.png", ""] }); + .setDisplay(VALUE_DISPLAY.path_array, { filter: ["image|*.png;*.jpg", ""] }); inputs[| 1] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) .setDisplay(VALUE_DISPLAY.padding) diff --git a/scripts/node_json_file_read/node_json_file_read.gml b/scripts/node_json_file_read/node_json_file_read.gml index 6fee09388..e4a67091b 100644 --- a/scripts/node_json_file_read/node_json_file_read.gml +++ b/scripts/node_json_file_read/node_json_file_read.gml @@ -1,7 +1,7 @@ function Node_create_Json_File_Read(_x, _y, _group = noone) { var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".json", ""); + path = get_open_filename("JSON file|*.json", ""); key_release(); if(path == "") return noone; } @@ -31,7 +31,7 @@ function Node_Json_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.json" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "JSON file|*.json" }) .rejectArray(); outputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "") diff --git a/scripts/node_json_file_write/node_json_file_write.gml b/scripts/node_json_file_write/node_json_file_write.gml index f22cda8da..a43b30edf 100644 --- a/scripts/node_json_file_write/node_json_file_write.gml +++ b/scripts/node_json_file_write/node_json_file_write.gml @@ -5,7 +5,7 @@ function Node_Json_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.json" }) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "json file|*.json" }) .rejectArray(); inputs[| 1] = nodeValue("Struct", self, JUNCTION_CONNECT.input, VALUE_TYPE.struct, {}) diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 0a6f8f34b..814bb4846 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -823,9 +823,9 @@ function __initNodes() { addNodeObject(node, "Lua Global", s_node_lua_global, "Node_Lua_Global", [1, Node_Lua_Global]).setVersion(1090); addNodeObject(node, "Lua Surface", s_node_lua_surface, "Node_Lua_Surface", [1, Node_Lua_Surface]).setVersion(1090); addNodeObject(node, "Lua Compute", s_node_lua_compute, "Node_Lua_Compute", [1, Node_Lua_Compute]).setVersion(1090); - + ds_list_add(node, "Shader"); - addNodeObject(node, "HLSL", s_node_hlsl, "Node_HLSL", [1, Node_HLSL],, "Execute HLSL shader on a surface.").setVersion(11520); + if(OS == os_windows) addNodeObject(node, "HLSL", s_node_hlsl, "Node_HLSL", [1, Node_HLSL],, "Execute HLSL shader on a surface.").setVersion(11520); ds_list_add(node, "Organize"); addNodeObject(node, "Pin", s_node_pin, "Node_Pin", [1, Node_Pin],, "Craete pin to organize your connection. Can be create by double clicking on a connection line."); diff --git a/scripts/node_text_file_read/node_text_file_read.gml b/scripts/node_text_file_read/node_text_file_read.gml index 4f258b8c2..ff4ad0226 100644 --- a/scripts/node_text_file_read/node_text_file_read.gml +++ b/scripts/node_text_file_read/node_text_file_read.gml @@ -1,7 +1,7 @@ function Node_create_Text_File_Read(_x, _y, _group = noone) { var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".txt", ""); + path = get_open_filename("text file|*.txt", ""); key_release(); if(path == "") return noone; } @@ -30,7 +30,7 @@ function Node_Text_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) cons w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.txt" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "text file|*.txt" }) .rejectArray(); outputs[| 0] = nodeValue("Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); diff --git a/scripts/node_text_file_write/node_text_file_write.gml b/scripts/node_text_file_write/node_text_file_write.gml index 73bb7bdb3..4df6a37ac 100644 --- a/scripts/node_text_file_write/node_text_file_write.gml +++ b/scripts/node_text_file_write/node_text_file_write.gml @@ -5,7 +5,7 @@ function Node_Text_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) con w = 128; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.txt" }) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "text file|*.txt" }) .rejectArray(); inputs[| 1] = nodeValue("Content", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 15587332b..ad907c7f6 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -504,11 +504,12 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru static DISPLAY_DATA_KEYS = [ "linked", "angle_display", "bone_id", "area_type", "unit", "atlas_crop" ]; #region ---- main ---- - node = _node; - x = node.x; - y = node.y; - index = _connect == JUNCTION_CONNECT.input? ds_list_size(node.inputs) : ds_list_size(node.outputs); - type = _type; + active = true; + node = _node; + x = node.x; + y = node.y; + index = _connect == JUNCTION_CONNECT.input? ds_list_size(node.inputs) : ds_list_size(node.outputs); + type = _type; forward = true; _initName = _name; @@ -535,6 +536,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru tooltip = _tooltip; editWidget = noone; + active_tooltip = ""; tags = VALUE_TAG.none; #endregion @@ -702,6 +704,21 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return self; } #endregion + static setActive = function(_active, _tooltip) { #region + INLINE + active = _active; + active_tooltip = _tooltip; + + return self; + } #endregion + + static setWindows = function() { #region + INLINE + setActive(OS == os_windows, "Not available on MacOS"); + + return self; + } #endregion + static resetValue = function() { #region unit.mode = def_unit; setValue(unit.apply(def_val)); diff --git a/scripts/node_wav_file_read/node_wav_file_read.gml b/scripts/node_wav_file_read/node_wav_file_read.gml index c275e8ec3..f3deb202e 100644 --- a/scripts/node_wav_file_read/node_wav_file_read.gml +++ b/scripts/node_wav_file_read/node_wav_file_read.gml @@ -1,7 +1,7 @@ function Node_create_WAV_File_Read(_x, _y, _group = noone) { #region var path = ""; if(!LOADING && !APPENDING && !CLONING) { - path = get_open_filename(".wav", ""); + path = get_open_filename("audio|*.wav", ""); key_release(); if(path == "") return noone; } @@ -32,7 +32,7 @@ function Node_WAV_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) const min_h = h; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_load, { filter: "*.wav" }) + .setDisplay(VALUE_DISPLAY.path_load, { filter: "audio|*.wav" }) .rejectArray(); inputs[| 1] = nodeValue("Sync lenght", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) diff --git a/scripts/node_wav_file_write/node_wav_file_write.gml b/scripts/node_wav_file_write/node_wav_file_write.gml index 968532e26..ad752eadd 100644 --- a/scripts/node_wav_file_write/node_wav_file_write.gml +++ b/scripts/node_wav_file_write/node_wav_file_write.gml @@ -6,7 +6,7 @@ function Node_WAV_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) cons min_h = h; inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") - .setDisplay(VALUE_DISPLAY.path_save, { filter: "*.wav" }) + .setDisplay(VALUE_DISPLAY.path_save, { filter: "audio file|*.wav" }) .rejectArray() .setVisible(true); diff --git a/scripts/node_widget_test/node_widget_test.gml b/scripts/node_widget_test/node_widget_test.gml index f2675c90e..26628d36b 100644 --- a/scripts/node_widget_test/node_widget_test.gml +++ b/scripts/node_widget_test/node_widget_test.gml @@ -31,7 +31,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru inputs[| 21] = nodeValue("buttonPalette", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE) .setDisplay(VALUE_DISPLAY.palette) inputs[| 22] = nodeValue("buttonGradient", self, JUNCTION_CONNECT.input, VALUE_TYPE.gradient, new gradientObject(c_white)) .setDisplay(VALUE_DISPLAY._default) - inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "*.png", "" ] }) + inputs[| 23] = nodeValue("pathArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, []) .setDisplay(VALUE_DISPLAY.path_array, { filter: [ "image|*.png;*.jpg", "" ] }) inputs[| 24] = nodeValue("pathLoad", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_load) inputs[| 25] = nodeValue("pathSave", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_save) inputs[| 26] = nodeValue("fontScrollBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "") .setDisplay(VALUE_DISPLAY.path_font) diff --git a/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml b/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml index 8a1bdc198..5e4f9fa56 100644 --- a/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml +++ b/scripts/panel_graph_export_image_dialog/panel_graph_export_image_dialog.gml @@ -53,7 +53,7 @@ function Panel_Graph_Export_Image(targetPanel) : PanelContent() constructor { b_export = button(function() { #region if(!is_surface(surface)) return; - var path = get_save_filename("*.png", "Screenshot"); + var path = get_save_filename("image|*.png;*.jpg", "Screenshot"); if(path == -1) return; if(filename_ext(path) != ".png") path += ".png"; diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index cf9e481e7..63dedcf2b 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -835,11 +835,12 @@ function Panel_Preview() : PanelContent() constructor { d3_view_camera.applyCamera(); + gpu_set_ztestenable(true); + gpu_set_zwriteenable(false); + if(OS != os_macosx) { gpu_set_cullmode(cull_noculling); - gpu_set_ztestenable(true); - gpu_set_zwriteenable(false); - + shader_set(sh_d3d_grid_view); var _dist = round(d3_view_camera.focus.distance(d3_view_camera.position)); var _tx = round(d3_view_camera.focus.x); @@ -853,9 +854,9 @@ function Panel_Preview() : PanelContent() constructor { shader_set_f("shift", _tx / _dist / 2, _ty / _dist / 2); draw_sprite_stretched(s_fx_pixel, 0, _tx - _dist, _ty - _dist, _dist * 2, _dist * 2); shader_reset(); - - gpu_set_zwriteenable(true); } + + gpu_set_zwriteenable(true); #endregion #region draw @@ -1477,7 +1478,7 @@ function Panel_Preview() : PanelContent() constructor { var prevS = getNodePreviewSurface(); if(!is_surface(prevS)) return; - var path = get_save_filename(".png", "export"); + var path = get_save_filename("image|*.png;*.jpg", "export"); key_release(); if(path == "") return; if(filename_ext(path) != ".png") path += ".png"; @@ -1486,7 +1487,7 @@ function Panel_Preview() : PanelContent() constructor { } #endregion function saveAllCurrentFrames() { #region - var path = get_save_filename(".png", "export"); + var path = get_save_filename("image|*.png;*.jpg", "export"); key_release(); if(path == "") return; diff --git a/scripts/pcx_parse/pcx_parse.gml b/scripts/pcx_parse/pcx_parse.gml index ecd981a30..500dc9925 100644 --- a/scripts/pcx_parse/pcx_parse.gml +++ b/scripts/pcx_parse/pcx_parse.gml @@ -37,7 +37,7 @@ #region parser function functionStringClean(fx) { #region - static __BRACKETS = [ "(", "[" ]; + static __BRACKETS = [ "(", "[", "," ]; var ch = "", ind = 0, len = string_length(fx); var _fx = "", str = false; diff --git a/scripts/windowManager/windowManager.gml b/scripts/windowManager/windowManager.gml index 029b55d1c..f45c91ce5 100644 --- a/scripts/windowManager/windowManager.gml +++ b/scripts/windowManager/windowManager.gml @@ -170,8 +170,9 @@ function winManStep() { #region winMan_setRect(sx, sy, sw, sh); - if(mouse_release(mb_left)) + if(mouse_release(mb_left)) { DISPLAY_REFRESH + } } if(mouse_release(mb_left)) { diff --git a/shaders/sh_d3d_default/sh_d3d_default.fsh b/shaders/sh_d3d_default/sh_d3d_default.fsh index d80ad4ad9..146ec2abe 100644 --- a/shaders/sh_d3d_default/sh_d3d_default.fsh +++ b/shaders/sh_d3d_default/sh_d3d_default.fsh @@ -76,6 +76,18 @@ uniform int use_8bit; uniform mat4 viewProjMat; #endregion +#region ++++ mapping ++++ + vec2 equirectangularUv(vec3 dir) { + vec3 n = normalize(dir); + return vec2((atan(n.x, n.y) / TAU) + 0.5, 1. - acos(n.z) / PI); + } + + float unormToFloat(vec3 v) { + v *= 256.; + return (v.r * 65536. + v.g * 256. + v.b) / (65536.); + } +#endregion + #region ++++ matrix ++++ float matrixGet(mat4 matrix, int index) { if(index < 0 || index > 15) return 0.; @@ -97,25 +109,33 @@ uniform int use_8bit; #region ++++ shadow sampler ++++ float sampleDirShadowMap(int index, vec2 position) { - if(index == 0) return texture2D(light_dir_shadowmap_0, position).r; - if(index == 1) return texture2D(light_dir_shadowmap_1, position).r; - //if(index == 2) return texture2D(light_dir_shadowmap_2, position).r; - //if(index == 3) return texture2D(light_dir_shadowmap_3, position).r; - return 0.; + vec4 d; + + if(index == 0) d = texture2D(light_dir_shadowmap_0, position); + else if(index == 1) d = texture2D(light_dir_shadowmap_1, position); + //else if(index == 2) d = texture2D(light_dir_shadowmap_2, position); + //else if(index == 3) d = texture2D(light_dir_shadowmap_3, position); + + if(use_8bit == 1) + return unormToFloat(d.rgb); + return d.r; } float samplePntShadowMap(int index, vec2 position, int side) { + float d = 0.; + position.x /= 2.; if(side >= 3) { position.x += 0.5; side -= 3; } - if(index == 0) return texture2D(light_pnt_shadowmap_0, position)[side]; - if(index == 1) return texture2D(light_pnt_shadowmap_1, position)[side]; - //if(index == 2) return texture2D(light_pnt_shadowmap_2, position)[side]; - //if(index == 3) return texture2D(light_pnt_shadowmap_3, position)[side]; - return 0.; + if(index == 0) d = texture2D(light_pnt_shadowmap_0, position)[side]; + else if(index == 1) d = texture2D(light_pnt_shadowmap_1, position)[side]; + //else if(index == 2) d = texture2D(light_pnt_shadowmap_2, position)[side]; + //else if(index == 3) d = texture2D(light_pnt_shadowmap_3, position)[side]; + + return d; } #endregion @@ -142,17 +162,6 @@ uniform int use_8bit; } #endregion -#region ++++ mapping ++++ - vec2 equirectangularUv(vec3 dir) { - vec3 n = normalize(dir); - return vec2((atan(n.x, n.y) / TAU) + 0.5, 1. - acos(n.z) / PI); - } - - vec4 unormToFloat(vec4 vec) { - return vec - 1. * 65536.; - } -#endregion - void main() { vec2 uv_coord = v_vTexcoord; if(mat_flip == 1) uv_coord.y = -uv_coord.y; @@ -170,11 +179,8 @@ void main() { #region ++++ normal ++++ vec3 _norm = v_vNormal; - if(mat_defer_normal == 1) { + if(mat_defer_normal == 1) _norm = texture2D(mat_normal_map, viewProjPos.xy).rgb; - if(use_8bit == 1) - _norm = unormToFloat(_norm); - } vec3 normal = normalize(_norm); #endregion @@ -232,12 +238,15 @@ void main() { if(lightMapPosition.x >= 0. && lightMapPosition.x <= 1. && lightMapPosition.y >= 0. && lightMapPosition.y <= 1.) { light_map_depth = sampleDirShadowMap(shadow_map_index, lightMapPosition); - + + //gl_FragData[0] = texture2D(light_dir_shadowmap_0, lightMapPosition); + //return; + shadow_map_index++; lightDistance = v_lightDistance; float shadowFactor = dot(normal, lightVector); float bias = mix(light_dir_shadow_bias[i], 0., shadowFactor); - + if(lightDistance > light_map_depth + bias) continue; } diff --git a/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh b/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh index 4a7020655..e320167bc 100644 --- a/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh +++ b/shaders/sh_d3d_geometry/sh_d3d_geometry.fsh @@ -21,10 +21,4 @@ void main() { gl_FragData[0] = vec4(v_worldPosition.xyz, mat_baseColor.a); gl_FragData[1] = vec4(v_viewPosition, mat_baseColor.a); gl_FragData[2] = vec4(normalize(normal), mat_baseColor.a); - - if(use_8bit == 1) { - gl_FragData[0] = gl_FragData[0] / 65536. + 1.; - gl_FragData[1] = gl_FragData[1] / 65536. + 1.; - gl_FragData[2] = gl_FragData[2] / 65536. + 1.; - } } diff --git a/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh index eba96cbca..220878660 100644 --- a/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh +++ b/shaders/sh_d3d_normal_blur/sh_d3d_normal_blur.fsh @@ -7,7 +7,7 @@ varying vec4 v_vColour; uniform vec2 dimension; uniform float radius; uniform int use_8bit; - + void main() { vec3 current = texture2D( gm_BaseTexture, v_vTexcoord ).rgb; if(length(current) == 0.) { @@ -39,6 +39,6 @@ void main() { gl_FragColor = vec4(sampled / weight, 1.); if(use_8bit == 1) { - gl_FragColor = gl_FragColor / 65536. + 1.; + gl_FragColor = gl_FragColor / 256.; } } diff --git a/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh index 86ed1f41b..7e21d4f8e 100644 --- a/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh +++ b/shaders/sh_d3d_shadow_depth/sh_d3d_shadow_depth.fsh @@ -1,7 +1,19 @@ varying float v_LightDepth; uniform int use_8bit; -void main() { - gl_FragColor = vec4(v_LightDepth, v_LightDepth, v_LightDepth, 1.); - //gl_FragColor = vec4(1.); +vec3 floatToUnorm(float v) { + v *= 65536.; + + float r = floor(v / 65536.); v -= 65536. * r; + float g = floor(v / 256.); v -= 256. * g; + float b = floor(v); + + return vec3(r, g, b) / 256.; +} + +void main() { + float d = v_LightDepth; + + if(use_8bit == 1) gl_FragColor = vec4(floatToUnorm(d), 1.); + else gl_FragColor = vec4(vec3(d), 1.); }