- Fix error popup on some node when no input surface provided.

This commit is contained in:
Tanasart 2024-07-10 08:45:25 +07:00
parent 4a5cf38ce0
commit 18186d3e69
115 changed files with 208 additions and 208 deletions

View file

@ -2,8 +2,8 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_add_multiple_images", "%Name":"o_dialog_add_multiple_images",
"eventList":[ "eventList":[
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_add_multiple_images", "name":"o_dialog_add_multiple_images",

View file

@ -2,9 +2,9 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_dialog_add_node", "%Name":"o_dialog_add_node",
"eventList":[ "eventList":[
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":1,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_dialog_add_node", "name":"o_dialog_add_node",

View file

@ -32,7 +32,7 @@ if !ready exit;
content.drawContent(panel); content.drawContent(panel);
gpu_set_blendmode(bm_subtract); gpu_set_blendmode(bm_subtract);
draw_surface_safe(mask_surface, 0, 0); draw_surface_safe(mask_surface);
gpu_set_blendmode(bm_normal); gpu_set_blendmode(bm_normal);
surface_reset_target(); surface_reset_target();

View file

@ -2,25 +2,25 @@
"$GMObject":"", "$GMObject":"",
"%Name":"o_main", "%Name":"o_main",
"eventList":[ "eventList":[
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":0,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":2,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":2,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":0,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":3,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":5,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":5,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":2,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":2,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":3,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":3,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":4,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":4,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":20,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":20,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":60,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":60,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":62,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":62,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":68,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":68,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":69,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":69,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":70,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":70,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":7,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":64,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":75,"eventType":8,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":9,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":9,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
{"$GMEvent":"","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":10,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",}, {"$GMEvent":"v1","%Name":"","collisionObjectId":null,"eventNum":1,"eventType":10,"isDnD":false,"name":"","resourceType":"GMEvent","resourceVersion":"2.0",},
], ],
"managed":true, "managed":true,
"name":"o_main", "name":"o_main",

View file

@ -141,7 +141,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
surface_set_shader(ts, sh_3d_extrude_filler); surface_set_shader(ts, sh_3d_extrude_filler);
DRAW_CLEAR DRAW_CLEAR
shader_set_f("dimension", ww, hh); shader_set_f("dimension", ww, hh);
draw_surface_safe(_ins, 0, 0); draw_surface_safe(_ins);
surface_reset_shader(); surface_reset_shader();
_ins = ts; _ins = ts;
@ -150,7 +150,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
surface_set_shader(ds, sh_3d_extrude_filler_depth); surface_set_shader(ds, sh_3d_extrude_filler_depth);
DRAW_CLEAR DRAW_CLEAR
shader_set_f("dimension", ww, hh); shader_set_f("dimension", ww, hh);
draw_surface_safe(_hei, 0, 0); draw_surface_safe(_hei);
surface_reset_shader(); surface_reset_shader();
_hei = ds; _hei = ds;
} }
@ -485,7 +485,7 @@ function __Node_3D_Extrude(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
var ts = surface_create(ww, hh); var ts = surface_create(ww, hh);
surface_set_shader(ts, sh_3d_extrude_corner); surface_set_shader(ts, sh_3d_extrude_corner);
shader_set_f("dimension", ww, hh); shader_set_f("dimension", ww, hh);
draw_surface_safe(_ins, 0, 0); draw_surface_safe(_ins);
surface_reset_shader(); surface_reset_shader();
textures[_array_index] = ts; textures[_array_index] = ts;
} else } else

View file

@ -183,7 +183,7 @@ function Biterator(node) : VCT(node) constructor {
var p = point_rotate(0, 0, _dim / 2, _dim / 2, ang); var p = point_rotate(0, 0, _dim / 2, _dim / 2, ang);
draw_surface_ext_safe(shap, p[0], p[1], 1, 1, ang, c_white, 1); draw_surface_ext_safe(shap, p[0], p[1], 1, 1, ang, c_white, 1);
} else } else
draw_surface(shap, 0, 0); draw_surface_safe(shap);
surface_reset_target(); surface_reset_target();
surface_free(shap); surface_free(shap);

View file

@ -57,7 +57,7 @@ function surface_apply_gaussian(surface, size, bg = false, bg_c = c_white, sampl
shader_set_i("overrideColor", overColor != noone); shader_set_i("overrideColor", overColor != noone);
shader_set_f("overColor", colToVec4(overColor)); shader_set_f("overColor", colToVec4(overColor));
draw_surface_safe(surface, 0, 0); draw_surface_safe(surface);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
@ -70,7 +70,7 @@ function surface_apply_gaussian(surface, size, bg = false, bg_c = c_white, sampl
shader_set_i("size", _size_v); shader_set_i("size", _size_v);
shader_set_i("horizontal", 0); shader_set_i("horizontal", 0);
draw_surface_safe(__blur_hori, 0, 0); draw_surface_safe(__blur_hori);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
gpu_set_tex_filter(false); gpu_set_tex_filter(false);

View file

@ -44,7 +44,7 @@ function canvas_freeform_step(active, _x, _y, _s, _mx, _my, _draw) { #region
draw_vertex(round(p2.x), round(p2.y)); draw_vertex(round(p2.x), round(p2.y));
} }
draw_primitive_end(); draw_primitive_end();
draw_surface(drawing_surface, 0, 0); draw_surface_safe(drawing_surface);
surface_reset_target(); surface_reset_target();
surface_set_shader(drawing_surface, sh_freeform_fill_cleanup); surface_set_shader(drawing_surface, sh_freeform_fill_cleanup);

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"canvas_tool_brush_shape_iso", "%Name":"canvas_tool_brush_shape_iso",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -29,7 +29,7 @@ function canvas_tool_corner() : canvas_tool_shader() constructor {
surface_set_shader(temp_surface[0], sh_image_trace); surface_set_shader(temp_surface[0], sh_image_trace);
shader_set_f("dimension", _dim); shader_set_f("dimension", _dim);
shader_set_i("diagonal", 0); shader_set_i("diagonal", 0);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
var _w = _dim[0], _h = _dim[1]; var _w = _dim[0], _h = _dim[1];
@ -288,7 +288,7 @@ function canvas_tool_corner() : canvas_tool_shader() constructor {
if(amount == 0) { if(amount == 0) {
surface_set_shader(preview_surface[1]); surface_set_shader(preview_surface[1]);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
return; return;
} }
@ -372,10 +372,10 @@ function canvas_tool_corner() : canvas_tool_shader() constructor {
surface_reset_shader(); surface_reset_shader();
surface_set_shader(preview_surface[1], noone); surface_set_shader(preview_surface[1], noone);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
BLEND_MULTIPLY BLEND_MULTIPLY
draw_surface(temp_surface[1], 0, 0); draw_surface_safe(temp_surface[1]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_shader(); surface_reset_shader();
@ -386,7 +386,7 @@ function canvas_tool_corner() : canvas_tool_shader() constructor {
// shader_set_f("amount", amount); // shader_set_f("amount", amount);
// shader_set_surface("base", _suf); // shader_set_surface("base", _suf);
// draw_surface(preview_surface[0], 0, 0); // draw_surface_safe(preview_surface[0]);
// surface_reset_shader(); // surface_reset_shader();
} }

View file

@ -32,7 +32,7 @@ function canvas_tool_extrude() : canvas_tool_shader() constructor {
shader_set_f("itr", round(sqrt(_dx * _dx + _dy * _dy))); shader_set_f("itr", round(sqrt(_dx * _dx + _dy * _dy)));
shader_set_color("color", CURRENT_COLOR); shader_set_color("color", CURRENT_COLOR);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -32,7 +32,7 @@ function canvas_tool_inset() : canvas_tool_shader() constructor {
shader_set_f("itr", round(sqrt(_dx * _dx + _dy * _dy))); shader_set_f("itr", round(sqrt(_dx * _dx + _dy * _dy)));
shader_set_color("color", CURRENT_COLOR); shader_set_color("color", CURRENT_COLOR);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -191,7 +191,7 @@ function canvas_tool_node(canvas, node) : canvas_tool() constructor {
surface_set_shader(maskedSurface); surface_set_shader(maskedSurface);
draw_surface_safe(_surf); draw_surface_safe(_surf);
BLEND_MULTIPLY BLEND_MULTIPLY
draw_surface_safe(canvas.tool_selection.selection_mask, 0, 0); draw_surface_safe(canvas.tool_selection.selection_mask);
BLEND_NORMAL BLEND_NORMAL
surface_reset_shader(); surface_reset_shader();

View file

@ -23,7 +23,7 @@ function canvas_tool_outline() : canvas_tool_shader() constructor {
shader_set_i("filter", array_create(9, 1)); shader_set_i("filter", array_create(9, 1));
shader_set_color("borderColor", CURRENT_COLOR); shader_set_color("borderColor", CURRENT_COLOR);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
} }
@ -43,7 +43,7 @@ function canvas_tool_outline() : canvas_tool_shader() constructor {
shader_set_i("filter", array_create(9, 1)); shader_set_i("filter", array_create(9, 1));
shader_set_color("borderColor", c_white); shader_set_color("borderColor", c_white);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
mask_boundary[0] = mask_boundary_init[0] - _thck; mask_boundary[0] = mask_boundary_init[0] - _thck;
@ -59,7 +59,7 @@ function canvas_tool_outline() : canvas_tool_shader() constructor {
shader_set_i("border", 0); shader_set_i("border", 0);
shader_set_i("alpha", 1); shader_set_i("alpha", 1);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
mask_boundary[0] = mask_boundary_init[0] + _thck; mask_boundary[0] = mask_boundary_init[0] + _thck;

View file

@ -48,7 +48,7 @@ function canvas_tool_resize() : canvas_tool() constructor {
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
draw_surface(overlay_surface, 0, 0); draw_surface_safe(overlay_surface);
draw_set_color(c_black); draw_set_color(c_black);
draw_rectangle(x0, y0, x1, y1, true); draw_rectangle(x0, y0, x1, y1, true);

View file

@ -51,14 +51,14 @@ function canvas_tool_selection(selector = noone) : canvas_tool() constructor {
surface_set_target(selection_surface); surface_set_target(selection_surface);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(surface, 0, 0); draw_surface_safe(surface);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
surface_set_target(selection_mask); surface_set_target(selection_mask);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(surface, 0, 0); draw_surface_safe(surface);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
@ -140,13 +140,13 @@ function canvas_tool_selection(selector = noone) : canvas_tool() constructor {
draw_surface_safe(_canvas_surface, -sel_x0, -sel_y0); draw_surface_safe(_canvas_surface, -sel_x0, -sel_y0);
BLEND_MULTIPLY BLEND_MULTIPLY
draw_surface_safe(_mask, 0, 0); draw_surface_safe(_mask);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
surface_set_target(selection_mask); surface_set_target(selection_mask);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_mask, 0, 0); draw_surface_safe(_mask);
surface_reset_target(); surface_reset_target();
node.storeAction(); node.storeAction();
@ -172,7 +172,7 @@ function canvas_tool_selection(selector = noone) : canvas_tool() constructor {
surface_set_target(selection_surface); surface_set_target(selection_surface);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_canvas_surface, 0, 0); draw_surface_safe(_canvas_surface);
surface_reset_target(); surface_reset_target();
surface_set_target(selection_mask); surface_set_target(selection_mask);

View file

@ -111,7 +111,7 @@ function canvas_tool_skew() : canvas_tool_shader() constructor {
shader_set_color("color", CURRENT_COLOR); shader_set_color("color", CURRENT_COLOR);
draw_surface(preview_surface[0], 0, 0); draw_surface_safe(preview_surface[0]);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -110,16 +110,16 @@ function __3dLightPoint() : __3dLight() constructor {
draw_clear(c_black); draw_clear(c_black);
gpu_set_blendmode_ext(bm_one, bm_one); gpu_set_blendmode_ext(bm_one, bm_one);
draw_surface(shadow_maps[0], 0, 0); draw_surface_safe(shadow_maps[0]);
draw_surface(shadow_maps[3], shadow_map_size, 0); draw_surface(shadow_maps[3], shadow_map_size, 0);
shader_set(sh_channel_R2G); shader_set(sh_channel_R2G);
draw_surface(shadow_maps[1], 0, 0); draw_surface_safe(shadow_maps[1]);
draw_surface(shadow_maps[4], shadow_map_size, 0); draw_surface(shadow_maps[4], shadow_map_size, 0);
shader_reset(); shader_reset();
shader_set(sh_channel_R2B); shader_set(sh_channel_R2B);
draw_surface(shadow_maps[2], 0, 0); draw_surface_safe(shadow_maps[2]);
draw_surface(shadow_maps[5], shadow_map_size, 0); draw_surface(shadow_maps[5], shadow_map_size, 0);
shader_reset(); shader_reset();

View file

@ -22,7 +22,7 @@ function fd_rectangle_set_target(domain, type) {
case FD_TARGET_TYPE.REPLACE_MATERIAL_ADVANCED: case FD_TARGET_TYPE.REPLACE_MATERIAL_ADVANCED:
surface_set_target(sf_material_0_temporary); surface_set_target(sf_material_0_temporary);
draw_enable_alphablend(false); draw_enable_alphablend(false);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
shader_set(sh_fd_replace_material_advanced_glsl); shader_set(sh_fd_replace_material_advanced_glsl);
shader_set_uniform_f(shader_get_uniform(sh_fd_replace_material_advanced_glsl, "addend"), 0.5 + 0.5 * sf_material_texel_width, 0.5 + 0.5 * sf_material_texel_height); shader_set_uniform_f(shader_get_uniform(sh_fd_replace_material_advanced_glsl, "addend"), 0.5 + 0.5 * sf_material_texel_width, 0.5 + 0.5 * sf_material_texel_height);
texture_set_stage(shader_get_sampler_index(sh_fd_replace_material_advanced_glsl, "texture_material_0"), surface_get_texture(sf_material_0)); texture_set_stage(shader_get_sampler_index(sh_fd_replace_material_advanced_glsl, "texture_material_0"), surface_get_texture(sf_material_0));
@ -40,7 +40,7 @@ function fd_rectangle_set_target(domain, type) {
case FD_TARGET_TYPE.ADD_VELOCITY: case FD_TARGET_TYPE.ADD_VELOCITY:
surface_set_target(sf_velocity_temporary); surface_set_target(sf_velocity_temporary);
draw_enable_alphablend(false); draw_enable_alphablend(false);
draw_surface(sf_velocity, 0, 0); draw_surface_safe(sf_velocity);
shader_set(sh_fd_add_velocity_glsl); shader_set(sh_fd_add_velocity_glsl);
shader_set_uniform_f(shader_get_uniform(sh_fd_add_velocity_glsl, "addend"), 0.5 + 0.5 * sf_velocity_texel_width, 0.5 + 0.5 * sf_velocity_texel_height); shader_set_uniform_f(shader_get_uniform(sh_fd_add_velocity_glsl, "addend"), 0.5 + 0.5 * sf_velocity_texel_width, 0.5 + 0.5 * sf_velocity_texel_height);

View file

@ -29,7 +29,7 @@ function fd_rectangle_update_material(domain) {
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_8_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5, shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_8_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5,
sf_material_texel_width * -0.5, sf_material_texel_height * -0.5); sf_material_texel_width * -0.5, sf_material_texel_height * -0.5);
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_8_glsl, "precalculated_2"), material_dissipation_type, material_dissipation_value, material_maccormack_weight * 0.5); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_8_glsl, "precalculated_2"), material_dissipation_type, material_dissipation_value, material_maccormack_weight * 0.5);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary; temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary;
@ -47,7 +47,7 @@ function fd_rectangle_update_material(domain) {
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_8_glsl, "precalculated"), material_time_step * sf_material_texel_width, material_time_step * sf_material_texel_height); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_8_glsl, "precalculated"), material_time_step * sf_material_texel_width, material_time_step * sf_material_texel_height);
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_8_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5, shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_8_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5,
sf_material_texel_width * -0.5, sf_material_texel_height * -0.5); sf_material_texel_width * -0.5, sf_material_texel_height * -0.5);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary; temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary;
@ -63,7 +63,7 @@ function fd_rectangle_update_material(domain) {
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_16_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5, shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_16_glsl, "precalculated_1"), sf_material_texel_width * 0.5, sf_material_texel_height * 0.5,
sf_material_texel_width * -0.5, sf_material_texel_height * -0.5); sf_material_texel_width * -0.5, sf_material_texel_height * -0.5);
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_16_glsl, "precalculated_2"), material_dissipation_type, material_dissipation_value, material_maccormack_weight * 0.5); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_a_16_glsl, "precalculated_2"), material_dissipation_type, material_dissipation_value, material_maccormack_weight * 0.5);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary; temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary;
@ -84,12 +84,12 @@ function fd_rectangle_update_material(domain) {
surface_set_target(sf_material_0_temporary); surface_set_target(sf_material_0_temporary);
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_16_glsl, "target"), 0); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_16_glsl, "target"), 0);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
surface_reset_target(); surface_reset_target();
surface_set_target(sf_material_1_temporary); surface_set_target(sf_material_1_temporary);
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_16_glsl, "target"), 1); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_material_rgba_16_glsl, "target"), 1);
draw_surface(sf_material_0, 0, 0); draw_surface_safe(sf_material_0);
surface_reset_target(); surface_reset_target();
temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary; temporary = sf_material_0; sf_material_0 = sf_material_0_temporary; sf_material_0_temporary = temporary;

View file

@ -37,7 +37,7 @@ function fd_rectangle_update_velocity(domain) {
shader_set_uniform_f(shader_get_uniform(sh_fd_advect_velocity_1_glsl, "acceleration"), acceleration_x, acceleration_y, acceleration_a, acceleration_b); shader_set_uniform_f(shader_get_uniform(sh_fd_advect_velocity_1_glsl, "acceleration"), acceleration_x, acceleration_y, acceleration_a, acceleration_b);
break; break;
} }
draw_surface(sf_velocity, 0, 0); draw_surface_safe(sf_velocity);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
temporary = sf_velocity; sf_velocity = sf_velocity_temporary; sf_velocity_temporary = temporary; temporary = sf_velocity; sf_velocity = sf_velocity_temporary; sf_velocity_temporary = temporary;
@ -56,7 +56,7 @@ function fd_rectangle_update_velocity(domain) {
shader_set_uniform_f(shader_get_uniform(sh_fd_calculate_pressure_jacobi_glsl, "texel_size"), sf_pressure_texel_width, sf_pressure_texel_height); shader_set_uniform_f(shader_get_uniform(sh_fd_calculate_pressure_jacobi_glsl, "texel_size"), sf_pressure_texel_width, sf_pressure_texel_height);
repeat (pressure_iteration_type) { repeat (pressure_iteration_type) {
surface_set_target(sf_pressure_temporary); surface_set_target(sf_pressure_temporary);
draw_surface(sf_pressure, 0, 0); draw_surface_safe(sf_pressure);
surface_reset_target(); surface_reset_target();
temporary = sf_pressure; sf_pressure = sf_pressure_temporary; sf_pressure_temporary = temporary; temporary = sf_pressure; sf_pressure = sf_pressure_temporary; sf_pressure_temporary = temporary;
} }
@ -68,7 +68,7 @@ function fd_rectangle_update_velocity(domain) {
for (var i = 0; i < length; ++i) { for (var i = 0; i < length; ++i) {
if (pressure_relaxation_parameter[i] != -1) shader_set_uniform_f(shader_get_uniform(sh_fd_calculate_pressure_srj_glsl, "precalculated"), 1 - pressure_relaxation_parameter[i], 0.25 * pressure_relaxation_parameter[i]); if (pressure_relaxation_parameter[i] != -1) shader_set_uniform_f(shader_get_uniform(sh_fd_calculate_pressure_srj_glsl, "precalculated"), 1 - pressure_relaxation_parameter[i], 0.25 * pressure_relaxation_parameter[i]);
surface_set_target(sf_pressure_temporary); surface_set_target(sf_pressure_temporary);
draw_surface(sf_pressure, 0, 0); draw_surface_safe(sf_pressure);
surface_reset_target(); surface_reset_target();
temporary = sf_pressure; sf_pressure = sf_pressure_temporary; sf_pressure_temporary = temporary; temporary = sf_pressure; sf_pressure = sf_pressure_temporary; sf_pressure_temporary = temporary;
} }
@ -80,7 +80,7 @@ function fd_rectangle_update_velocity(domain) {
shader_set(sh_fd_subtract_pressure_gradient_glsl); shader_set(sh_fd_subtract_pressure_gradient_glsl);
texture_set_stage(shader_get_sampler_index(sh_fd_subtract_pressure_gradient_glsl, "texture_pressure"), surface_get_texture(sf_pressure)); texture_set_stage(shader_get_sampler_index(sh_fd_subtract_pressure_gradient_glsl, "texture_pressure"), surface_get_texture(sf_pressure));
shader_set_uniform_f(shader_get_uniform(sh_fd_subtract_pressure_gradient_glsl, "texel_size"), sf_pressure_texel_width, sf_pressure_texel_height); shader_set_uniform_f(shader_get_uniform(sh_fd_subtract_pressure_gradient_glsl, "texel_size"), sf_pressure_texel_width, sf_pressure_texel_height);
draw_surface(sf_velocity, 0, 0); draw_surface_safe(sf_velocity);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
temporary = sf_velocity; sf_velocity = sf_velocity_temporary; sf_velocity_temporary = temporary; temporary = sf_velocity; sf_velocity = sf_velocity_temporary; sf_velocity_temporary = temporary;

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"hotkey_data", "%Name":"hotkey_data",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"load_function", "%Name":"load_function",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -33,7 +33,7 @@ function mask_modify(mask, invert = false, feather = 0) { #region
surface_set_shader(__temp_mask, sh_mask_invert); surface_set_shader(__temp_mask, sh_mask_invert);
shader_set_i("invert", invert); shader_set_i("invert", invert);
draw_surface(mask, 0, 0); draw_surface_safe(mask);
surface_reset_shader(); surface_reset_shader();
if(feather > 0) { if(feather > 0) {

View file

@ -162,7 +162,7 @@ function Node_2D_light(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_set_target(_outSurf); surface_set_target(_outSurf);
if(_output_index == 0) { if(_output_index == 0) {
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
} else } else
draw_clear_alpha(c_black, 1); draw_clear_alpha(c_black, 1);

View file

@ -365,10 +365,10 @@ function Node_3D_Camera(_x, _y, _group = noone) : Node_3D_Object(_x, _y, _group)
BLEND_ALPHA BLEND_ALPHA
if(_dbg) { if(_dbg) {
draw_surface_safe(_bgSurf, 0, 0); draw_surface_safe(_bgSurf);
surface_free(_bgSurf); surface_free(_bgSurf);
} }
draw_surface_safe(_render, 0, 0); draw_surface_safe(_render);
if(deferData) { if(deferData) {
BLEND_MULTIPLY BLEND_MULTIPLY

View file

@ -243,10 +243,10 @@ function Node_FLIP_Render(_x, _y, _group = noone) : Node(_x, _y, _group) constru
if(_thr) { if(_thr) {
shader_set(sh_FLIP_render_threshold); shader_set(sh_FLIP_render_threshold);
shader_set_f("threshold", 1 - _bln); shader_set_f("threshold", 1 - _bln);
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
shader_reset(); shader_reset();
} else } else
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
if(_obs) if(_obs)
for( var i = 0, n = array_length(domain.obstracles); i < n; i++ ) for( var i = 0, n = array_length(domain.obstracles); i < n; i++ )

View file

@ -29,7 +29,7 @@ function Node_FXAA(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
shader_set_f("cornerDis", _data[2]); shader_set_f("cornerDis", _data[2]);
shader_set_f("mixAmo", _data[3]); shader_set_f("mixAmo", _data[3]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
gpu_set_tex_filter(false); gpu_set_tex_filter(false);
surface_reset_shader(); surface_reset_shader();

View file

@ -90,7 +90,7 @@ function Node_Active_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) const
surface_set_target(_surf); surface_set_target(_surf);
DRAW_CLEAR DRAW_CLEAR
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
if(!is_surface(_bsurf)) { if(!is_surface(_bsurf)) {
if(IS_FIRST_FRAME || brush_prev == noone) if(IS_FIRST_FRAME || brush_prev == noone)

View file

@ -36,7 +36,7 @@ function Node_Alpha_Cutoff(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
shader_set(sh_alpha_cutoff); shader_set(sh_alpha_cutoff);
shader_set_uniform_f(shader_get_uniform(sh_alpha_cutoff, "cutoff"), _data[1]); shader_set_uniform_f(shader_get_uniform(sh_alpha_cutoff, "cutoff"), _data[1]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
shader_reset(); shader_reset();
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -16,7 +16,7 @@ function Node_Alpha_Grey(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
static processData = function(_outSurf, _data, _output_index, _array_index) { #region static processData = function(_outSurf, _data, _output_index, _array_index) { #region
surface_set_shader(_outSurf, sh_alpha_grey); surface_set_shader(_outSurf, sh_alpha_grey);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -28,7 +28,7 @@ function Node_Alpha_Hash(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set(shader); shader_set(shader);
shader_set_uniform_f(uniform_dim, surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_uniform_f(uniform_dim, surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
shader_set_uniform_f_array_safe(uniform_dit, dither8); shader_set_uniform_f_array_safe(uniform_dit, dither8);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
shader_reset(); shader_reset();
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"node_array_pin", "%Name":"node_array_pin",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -35,7 +35,7 @@ function Node_Atlas(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
repeat(_itr) { repeat(_itr) {
surface_set_shader(temp_surface[_bg], sh_atlas); surface_set_shader(temp_surface[_bg], sh_atlas);
shader_set_f("dimension", _dim); shader_set_f("dimension", _dim);
draw_surface(temp_surface[!_bg], 0, 0); draw_surface_safe(temp_surface[!_bg]);
surface_reset_shader(); surface_reset_shader();
_bg = !_bg; _bg = !_bg;

View file

@ -51,7 +51,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
for( var i = 0; i <= lop; i++ ) { for( var i = 0; i <= lop; i++ ) {
surface_set_shader(_Surf[_ind], sh_average); surface_set_shader(_Surf[_ind], sh_average);
shader_set_f("dimension", side); shader_set_f("dimension", side);
draw_surface_safe(_Surf[!_ind], 0, 0); draw_surface_safe(_Surf[!_ind]);
surface_reset_shader(); surface_reset_shader();
_ind = !_ind; _ind = !_ind;

View file

@ -237,7 +237,7 @@ function Node_Blend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
} else if(_outp == NODE_BLEND_OUTPUT.foreground) { } else if(_outp == NODE_BLEND_OUTPUT.foreground) {
surface_set_shader(_foreDraw, noone,, BLEND.over); surface_set_shader(_foreDraw, noone,, BLEND.over);
draw_surface_safe(_fore, 0, 0); draw_surface_safe(_fore);
surface_reset_shader(); surface_reset_shader();
surface_set_shader(_backDraw, noone,, BLEND.over); surface_set_shader(_backDraw, noone,, BLEND.over);

View file

@ -61,13 +61,13 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_f("blend" , clamp(_data[6], 0.001, 0.999)); shader_set_f("blend" , clamp(_data[6], 0.001, 0.999));
shader_set_f("smooth" , _data[7]); shader_set_f("smooth" , _data[7]);
draw_surface(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
surface_set_shader(_outSurf, sh_blend_edge); surface_set_shader(_outSurf, sh_blend_edge);
shader_set_i("edge" , 1); shader_set_i("edge" , 1);
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
surface_reset_shader(); surface_reset_shader();
} else { } else {
@ -77,7 +77,7 @@ function Node_Blend_Edge(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_i("edge" , _edg - 1); shader_set_i("edge" , _edg - 1);
shader_set_f("blend" , clamp(_data[6], 0.001, 0.999)); shader_set_f("blend" , clamp(_data[6], 0.001, 0.999));
draw_surface(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -92,7 +92,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
shader_set_f("overColor", colToVec4(_overc)); shader_set_f("overColor", colToVec4(_overc));
shader_set_f("angle", degtorad(_dirr)); shader_set_f("angle", degtorad(_dirr));
draw_surface_safe(_surf, 0, 0); draw_surface_safe(_surf);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
@ -106,7 +106,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
shader_set_i("size", _size_v); shader_set_i("size", _size_v);
shader_set_i("horizontal", 0); shader_set_i("horizontal", 0);
draw_surface_safe(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
@ -114,7 +114,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
surface_set_target(_outSurf); surface_set_target(_outSurf);
draw_clear_alpha(_isovr? _overc : 0, 0); draw_clear_alpha(_isovr? _overc : 0, 0);
draw_surface(temp_surface[1], 0, 0); draw_surface_safe(temp_surface[1]);
surface_reset_target(); surface_reset_target();
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -47,7 +47,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])); shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
shader_set_f_map("strength", _data[1], _data[8], inputs[| 1]); shader_set_f_map("strength", _data[1], _data[8], inputs[| 1]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -56,7 +56,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
shader_set_f("treshold", _tres); shader_set_f("treshold", _tres);
shader_set_i("gamma", _gam); shader_set_i("gamma", _gam);
draw_surface_safe(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -79,7 +79,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
shader_set_i("gamma", _data[12]); shader_set_i("gamma", _data[12]);
shader_set_i("sampleMode", struct_try_get(attributes, "oversample")); shader_set_i("sampleMode", struct_try_get(attributes, "oversample"));
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -61,7 +61,7 @@ function Node_Blur_Slope(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_i("sampleMode", struct_try_get(attributes, "oversample")); shader_set_i("sampleMode", struct_try_get(attributes, "oversample"));
shader_set_i("gamma", _data[11]); shader_set_i("gamma", _data[11]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -53,7 +53,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
surface_set_shader(_outSurf, sh_bw); surface_set_shader(_outSurf, sh_bw);
shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]); shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]);
shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]); shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -584,7 +584,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
var _newCanvas = surface_create(_dim[0], _dim[1]); var _newCanvas = surface_create(_dim[0], _dim[1]);
surface_set_target(_newCanvas); surface_set_target(_newCanvas);
DRAW_CLEAR DRAW_CLEAR
draw_surface(_canvas_surface, 0, 0); draw_surface_safe(_canvas_surface);
surface_reset_target(); surface_reset_target();
setCanvasSurface(_newCanvas, index); setCanvasSurface(_newCanvas, index);
@ -649,7 +649,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
if(tool_attribute.mirror[1] && tool_attribute.mirror[2]) draw_surface_ext_safe(drawing_surface, _spx * 2 + _spw - _spx, _spy * 2 + _sph - _spy, -1, -1); if(tool_attribute.mirror[1] && tool_attribute.mirror[2]) draw_surface_ext_safe(drawing_surface, _spx * 2 + _spw - _spx, _spy * 2 + _sph - _spy, -1, -1);
BLEND_MULTIPLY BLEND_MULTIPLY
draw_surface(tool_selection.selection_mask, 0, 0); draw_surface_safe(tool_selection.selection_mask);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
@ -663,7 +663,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(drawing_surface, 0, 0); draw_surface_safe(drawing_surface);
BLEND_ALPHA BLEND_ALPHA
if(tool_attribute.mirror[0] == false) { if(tool_attribute.mirror[0] == false) {
@ -853,7 +853,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
if(_tool) _tool.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny); if(_tool) _tool.drawOverlay(hover, active, _x, _y, _s, _mx, _my, _snx, _sny);
surface_set_shader(preview_draw_surface, noone,, BLEND.alpha); surface_set_shader(preview_draw_surface, noone,, BLEND.alpha);
draw_surface_safe(_drawing_surface, 0, 0); draw_surface_safe(_drawing_surface);
if(tool_selection.is_selected) { if(tool_selection.is_selected) {
var _spx = tool_selection.selection_position[0]; var _spx = tool_selection.selection_position[0];
@ -1054,7 +1054,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
surface_set_shader(output_surface[0], noone,, BLEND.alpha); surface_set_shader(output_surface[0], noone,, BLEND.alpha);
if(_bgr && is_surface(_bg)) if(_bgr && is_surface(_bg))
draw_surface_stretched_ext(_bg, 0, 0, _dim[0], _dim[1], c_white, _bga); draw_surface_stretched_ext(_bg, 0, 0, _dim[0], _dim[1], c_white, _bga);
draw_surface_safe(_canvas_surface, 0, 0); draw_surface_safe(_canvas_surface);
surface_reset_shader(); surface_reset_shader();
outputs[| 0].setValue(output_surface[0]); outputs[| 0].setValue(output_surface[0]);
@ -1067,7 +1067,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
surface_set_shader(output_surface[i], noone,, BLEND.alpha); surface_set_shader(output_surface[i], noone,, BLEND.alpha);
if(_bgr && is_surface(_bgArray)) if(_bgr && is_surface(_bgArray))
draw_surface_stretched_ext(_bgArray, 0, 0, _dim[0], _dim[1], c_white, _bga); draw_surface_stretched_ext(_bgArray, 0, 0, _dim[0], _dim[1], c_white, _bga);
draw_surface_safe(_canvas_surface, 0, 0); draw_surface_safe(_canvas_surface);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -59,7 +59,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
shader_set_f_map("treshold", _data[2], _data[10], inputs[| 2]); shader_set_f_map("treshold", _data[2], _data[10], inputs[| 2]);
shader_set_i("invert", _data[6]); shader_set_i("invert", _data[6]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -71,7 +71,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
shader_set_i("useMask", is_surface(msk)); shader_set_i("useMask", is_surface(msk));
shader_set_surface("mask", msk); shader_set_surface("mask", msk);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -294,7 +294,7 @@ function Node_Colors_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
shader_set_i("useMask", is_surface(msk)); shader_set_i("useMask", is_surface(msk));
shader_set_surface("mask", msk); shader_set_surface("mask", msk);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();

View file

@ -67,7 +67,7 @@ function Node_Cross_Section(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
shader_set_i("aa", _aa); shader_set_i("aa", _aa);
shader_set_i("mode", _mode); shader_set_i("mode", _mode);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"node_data", "%Name":"node_data",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -83,7 +83,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]); shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]);
shader_set_i("sampleMode", sam); shader_set_i("sampleMode", sam);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -53,7 +53,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
shader_set_uniform_f_array_safe(uniform_dim, [surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])]); shader_set_uniform_f_array_safe(uniform_dim, [surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0])]);
shader_set_uniform_i(uniform_filter, ft); shader_set_uniform_i(uniform_filter, ft);
shader_set_uniform_i(uniform_sam, ov); shader_set_uniform_i(uniform_sam, ov);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
shader_reset(); shader_reset();
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -53,7 +53,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
shader_set_f_map("size" , _data[1], _data[10], inputs[| 1]); shader_set_f_map("size" , _data[1], _data[10], inputs[| 1]);
shader_set_i("border" , _data[2]); shader_set_i("border" , _data[2]);
shader_set_i("alpha" , _data[3]); shader_set_i("alpha" , _data[3]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -81,7 +81,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_f("color", colaToVec4(_filC)); shader_set_f("color", colaToVec4(_filC));
shader_set_f("thres", _thr); shader_set_f("thres", _thr);
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface_safe(inSurf, 0, 0); draw_surface_safe(inSurf);
BLEND_NORMAL BLEND_NORMAL
shader_reset(); shader_reset();
@ -99,7 +99,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_set_shader(temp_surface[ind], sh_flood_fill_it); surface_set_shader(temp_surface[ind], sh_flood_fill_it);
shader_set_f("dimension", [ sw, sh ]); shader_set_f("dimension", [ sw, sh ]);
shader_set_i("diagonal", _dia); shader_set_i("diagonal", _dia);
draw_surface_safe(temp_surface[!ind], 0, 0); draw_surface_safe(temp_surface[!ind]);
surface_reset_shader(); surface_reset_shader();
} }
@ -108,7 +108,7 @@ function Node_Flood_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_surface("mask", temp_surface[ind]); shader_set_surface("mask", temp_surface[ind]);
shader_set_i("blend", _bnd); shader_set_i("blend", _bnd);
draw_surface_safe(inSurf, 0, 0); draw_surface_safe(inSurf);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -19,7 +19,7 @@ function Node_Gamma_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_set_shader(_outSurf, sh_gamma_map); surface_set_shader(_outSurf, sh_gamma_map);
shader_set_i("invert", _data[1]) shader_set_i("invert", _data[1])
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -31,7 +31,7 @@ function Node_Grey_Alpha(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_i("replace", _replace); shader_set_i("replace", _replace);
shader_set_color("color", _color); shader_set_color("color", _color);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -51,7 +51,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
surface_set_shader(_outSurf, sh_greyscale); surface_set_shader(_outSurf, sh_greyscale);
shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]); shader_set_f_map("brightness", _data[1], _data[ 9], inputs[| 1]);
shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]); shader_set_f_map("contrast", _data[2], _data[10], inputs[| 2]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -123,7 +123,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc
shader_set_f("fdimension", sw, sh); shader_set_f("fdimension", sw, sh);
shader_set_f("position", sx + _padd[PADDING.left], sy + _padd[PADDING.top]); shader_set_f("position", sx + _padd[PADDING.left], sy + _padd[PADDING.top]);
draw_surface(temp_surface[ppind], 0, 0); draw_surface_safe(temp_surface[ppind]);
surface_reset_shader(); surface_reset_shader();
ppind = !ppind; ppind = !ppind;
@ -140,7 +140,7 @@ function Node_Image_Grid(_x, _y, _group = noone) : Node(_x, _y, _group) construc
} }
surface_set_shader(_outSurf, noone); surface_set_shader(_outSurf, noone);
draw_surface(temp_surface[ppind], 0, 0); draw_surface_safe(temp_surface[ppind]);
surface_reset_shader(); surface_reset_shader();
outputs[| 0].setValue(_outSurf); outputs[| 0].setValue(_outSurf);

View file

@ -341,7 +341,7 @@ function Node_Image_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) constru
shader_set_color("color", _flcl); shader_set_color("color", _flcl);
shader_set_i("empty", !_fltp); shader_set_i("empty", !_fltp);
draw_surface(_inSurf, 0, 0); draw_surface_safe(_inSurf);
surface_reset_shader(); surface_reset_shader();
} }

View file

@ -34,7 +34,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
BLEND_OVERRIDE; BLEND_OVERRIDE;
shader_set(sh_invert); shader_set(sh_invert);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
shader_reset(); shader_reset();
BLEND_NORMAL; BLEND_NORMAL;

View file

@ -112,7 +112,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
shader_set_f_map("range" , _data[2], _data[10], inputs[| 2]); shader_set_f_map("range" , _data[2], _data[10], inputs[| 2]);
shader_set_i("keep", _data[11]); shader_set_i("keep", _data[11]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -49,7 +49,7 @@ function Node_Lovify(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
DRAW_CLEAR DRAW_CLEAR
shader_set(sh_lovify); shader_set(sh_lovify);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
shader_reset(); shader_reset();
repeat(amo) { repeat(amo) {

View file

@ -451,7 +451,7 @@ function Node_Mesh_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
shader_set_uniform_f_array_safe(uniform_dim, [ww, hh]); shader_set_uniform_f_array_safe(uniform_dim, [ww, hh]);
shader_set_uniform_f_array_safe(uniform_sam, [gw, gh]); shader_set_uniform_f_array_safe(uniform_sam, [gw, gh]);
draw_surface_safe(surf, 0, 0); draw_surface_safe(surf);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();
} #endregion } #endregion

View file

@ -87,7 +87,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
shader_set_i("useMask", _umask); shader_set_i("useMask", _umask);
shader_set_surface("mask", _mask); shader_set_surface("mask", _mask);
draw_surface(temp_surface[ind], 0, 0); draw_surface_safe(temp_surface[ind]);
surface_reset_shader(); surface_reset_shader();
ind = !ind; ind = !ind;
@ -104,7 +104,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_set_target(light_only[_array_index]); surface_set_target(light_only[_array_index]);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(temp_surface[2], 0, 0); draw_surface_safe(temp_surface[2]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();
@ -114,7 +114,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
if(_glow) { if(_glow) {
BLEND_ADD BLEND_ADD
@ -122,7 +122,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
} }
BLEND_ALPHA_MULP BLEND_ALPHA_MULP
draw_surface(temp_surface[2], 0, 0); draw_surface_safe(temp_surface[2]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();

View file

@ -286,7 +286,7 @@ function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
shader_set_i("shadowInv", _shdInv); shader_set_i("shadowInv", _shdInv);
shader_set_i("side", _pinn > 1); shader_set_i("side", _pinn > 1);
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -574,11 +574,11 @@ function Node_MK_Flare(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
if(_bg) { if(_bg) {
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
} }
BLEND_ADD BLEND_ADD
draw_surface(flares[_array_index], 0, 0); draw_surface_safe(flares[_array_index]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();

View file

@ -118,7 +118,7 @@ function Node_MK_Rain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
surface_set_target(_outSurf); surface_set_target(_outSurf);
DRAW_CLEAR DRAW_CLEAR
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
var _lcc = _cc; var _lcc = _cc;
if(_afad) BLEND_ADD if(_afad) BLEND_ADD

View file

@ -259,7 +259,7 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
if(_gint > 0) { #region if(_gint > 0) { #region
surface_set_target(temp_surface[1]); surface_set_target(temp_surface[1]);
draw_clear(c_black); draw_clear(c_black);
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
surface_reset_target(); surface_reset_target();
temp_surface[2] = surface_apply_gaussian(temp_surface[1], _grad, false, 0, 1); temp_surface[2] = surface_apply_gaussian(temp_surface[1], _grad, false, 0, 1);
@ -273,12 +273,12 @@ function Node_MK_Saber(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
shader_set(sh_mk_saber_glow); shader_set(sh_mk_saber_glow);
shader_set_color("color", _colr.eval(1)); shader_set_color("color", _colr.eval(1));
shader_set_f("intensity", _gint); shader_set_f("intensity", _gint);
draw_surface(temp_surface[2], 0, 0); draw_surface_safe(temp_surface[2]);
shader_reset(); shader_reset();
} }
BLEND_ALPHA_MULP BLEND_ALPHA_MULP
draw_surface(temp_surface[0], 0, 0); draw_surface_safe(temp_surface[0]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); #endregion surface_reset_target(); #endregion

View file

@ -182,9 +182,9 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
DRAW_CLEAR DRAW_CLEAR
BLEND_ALPHA_MULP BLEND_ALPHA_MULP
if(_use1) draw_surface(_tex1, 0, 0); if(_use1) draw_surface_safe(_tex1);
if(_index == 255) draw_surface(_tex0, 0, 0); if(_index == 255) draw_surface_safe(_tex0);
else draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t - b, l, t); else draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t - b, l, t);
if(_index & 0b0100_0000 >= 0b0100_0000) draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t, l, t); if(_index & 0b0100_0000 >= 0b0100_0000) draw_surface_part(_tex0, l, t, _sw - l - r, _sh - t, l, t);
@ -286,8 +286,8 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
DRAW_CLEAR DRAW_CLEAR
BLEND_ALPHA_MULP BLEND_ALPHA_MULP
if(_index == 15) draw_surface(_tex0, 0, 0); if(_index == 15) draw_surface_safe(_tex0);
else if(_use1) draw_surface(_tex1, 0, 0); else if(_use1) draw_surface_safe(_tex1);
if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0); if(_index & 0b0001) draw_surface_part(_tex0, 0, 0, _sw - r, _sh - b, 0, 0);
if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0); if(_index & 0b0010) draw_surface_part(_tex0, l, 0, _sw - l, _sh - b, l, 0);
@ -406,7 +406,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
__edge_uniform[3] = surface_verify(__edge_uniform[3], _esh, _esw); __edge_uniform[3] = surface_verify(__edge_uniform[3], _esh, _esw);
surface_set_shader(__edge_uniform[0], noone); surface_set_shader(__edge_uniform[0], noone);
draw_surface(_data[6], 0, 0); draw_surface_safe(_data[6]);
surface_reset_shader(); surface_reset_shader();
surface_set_shader(__edge_uniform[1], noone); surface_set_shader(__edge_uniform[1], noone);
@ -448,7 +448,7 @@ function Node_MK_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
BLEND_OVERRIDE BLEND_OVERRIDE
if(_edgSprt == 0) { if(_edgSprt == 0) {
draw_surface(_ed, 0, 0); draw_surface_safe(_ed);
} else if(_edgSprt == 1) { // flip side } else if(_edgSprt == 1) { // flip side
switch(j) { switch(j) {
case 0 : draw_surface(_ed, -_esw * 0, -_esh * 0); break; case 0 : draw_surface(_ed, -_esw * 0, -_esh * 0); break;

View file

@ -70,7 +70,7 @@ function Node_Normal_Light(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
shader_set_f("lightIntensity", _light_int); shader_set_f("lightIntensity", _light_int);
shader_set_i("lightType", _light_typ); shader_set_i("lightType", _light_typ);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -33,11 +33,11 @@ function Node_Normalize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
temp_surface[i] = surface_verify(temp_surface[i], _sw, _sh); temp_surface[i] = surface_verify(temp_surface[i], _sw, _sh);
surface_set_shader(temp_surface[0]); surface_set_shader(temp_surface[0]);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
surface_set_shader(temp_surface[1]); surface_set_shader(temp_surface[1]);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
surface_clear(temp_surface[2]); surface_clear(temp_surface[2]);

View file

@ -74,7 +74,7 @@ function Node_Onion_Skin(_x, _y, _group = noone) : Node(_x, _y, _group) construc
draw_surface_ext_safe(surf, 0, 0, 1, 1, 0, cc, aa); draw_surface_ext_safe(surf, 0, 0, 1, 1, 0, cc, aa);
} }
if(_top) draw_surface_safe(_surf, 0, 0); if(_top) draw_surface_safe(_surf);
surface_reset_target(); surface_reset_target();
} }
} }

View file

@ -51,7 +51,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
shader_set_f("paletteAmount", array_length(_pal)); shader_set_f("paletteAmount", array_length(_pal));
shader_set_f("shift", _shf); shader_set_f("shift", _shf);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -125,7 +125,7 @@ function Node_Particle(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y, _
if(is_surface(_bg)) _dim = surface_get_dimension(_bg) if(is_surface(_bg)) _dim = surface_get_dimension(_bg)
surface_set_shader(_outSurf, _type == PARTICLE_RENDER_TYPE.surface? sh_sample : noone); surface_set_shader(_outSurf, _type == PARTICLE_RENDER_TYPE.surface? sh_sample : noone);
if(is_surface(_bg)) draw_surface(_bg, 0, 0); if(is_surface(_bg)) draw_surface_safe(_bg);
switch(_blend) { switch(_blend) {
case PARTICLE_BLEND_MODE.normal: BLEND_NORMAL; break; case PARTICLE_BLEND_MODE.normal: BLEND_NORMAL; break;

View file

@ -891,7 +891,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
shader_set_f("cornerDis", 0.5); shader_set_f("cornerDis", 0.5);
shader_set_f("mixAmo", 1); shader_set_f("mixAmo", 1);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
surface_free(_surf); surface_free(_surf);

View file

@ -573,7 +573,7 @@ function Node_Path_3D(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
// shader_set_f("cornerDis", 0.5); // shader_set_f("cornerDis", 0.5);
// shader_set_f("mixAmo", 1); // shader_set_f("mixAmo", 1);
// draw_surface(_surf, 0, 0); // draw_surface_safe(_surf);
// surface_reset_shader(); // surface_reset_shader();
// surface_free(_surf); // surface_free(_surf);

View file

@ -120,7 +120,7 @@ function Node_PB_Box_Inset(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
surface_set_target(_nbox.mask); surface_set_target(_nbox.mask);
if(is_surface(_pbox.mask)) { if(is_surface(_pbox.mask)) {
draw_clear_alpha(0, 0); draw_clear_alpha(0, 0);
draw_surface_safe(_pbox.mask, 0, 0); draw_surface_safe(_pbox.mask);
} else } else
draw_clear(c_white); draw_clear(c_white);

View file

@ -79,7 +79,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
_nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h);
surface_set_target(_nbox.mask); surface_set_target(_nbox.mask);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_pbox.mask, 0, 0); draw_surface_safe(_pbox.mask);
surface_reset_target(); surface_reset_target();
} }
@ -87,7 +87,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
_nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h);
surface_set_target(_nbox.content); surface_set_target(_nbox.content);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_pbox.content, 0, 0); draw_surface_safe(_pbox.content);
surface_reset_target(); surface_reset_target();
} }
} else if(_output_index == 1) { } else if(_output_index == 1) {
@ -142,7 +142,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
_nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h);
surface_set_target(_nbox.mask); surface_set_target(_nbox.mask);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_pbox.mask, 0, 0); draw_surface_safe(_pbox.mask);
surface_reset_target(); surface_reset_target();
} }
@ -150,7 +150,7 @@ function Node_PB_Box_Split(_x, _y, _group = noone) : Node_PB_Box(_x, _y, _group)
_nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h); _nbox.content = surface_verify(_nbox.content, _nbox.w, _nbox.h);
surface_set_target(_nbox.content); surface_set_target(_nbox.content);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_pbox.content, 0, 0); draw_surface_safe(_pbox.content);
surface_reset_target(); surface_reset_target();
} }
} else if(_output_index == 1) { } else if(_output_index == 1) {

View file

@ -24,12 +24,12 @@ function Node_PB_Draw(_x, _y, _group = noone) : Node_PB(_x, _y, _group) construc
#macro PB_DRAW_CREATE_MASK _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); \ #macro PB_DRAW_CREATE_MASK _nbox.mask = surface_verify(_nbox.mask, _nbox.w, _nbox.h); \
surface_set_shader(_nbox.mask, sh_pb_to_mask); \ surface_set_shader(_nbox.mask, sh_pb_to_mask); \
draw_surface_safe(_nbox.content, 0, 0); \ draw_surface_safe(_nbox.content); \
surface_reset_shader(); surface_reset_shader();
#macro PB_DRAW_APPLY_MASK if(_mask) { \ #macro PB_DRAW_APPLY_MASK if(_mask) { \
BLEND_MULTIPLY \ BLEND_MULTIPLY \
if(is_surface(_pbox.mask)) \ if(is_surface(_pbox.mask)) \
draw_surface_safe(_pbox.mask, 0, 0); \ draw_surface_safe(_pbox.mask); \
BLEND_NORMAL \ BLEND_NORMAL \
} }

View file

@ -34,7 +34,7 @@ function Node_PB_Fx(_x, _y, _group = noone) : Node_PB(_x, _y, _group) constructo
\ \
_pbox.mask = surface_create(_pbox.w, _pbox.h); \ _pbox.mask = surface_create(_pbox.w, _pbox.h); \
surface_set_shader(_pbox.mask, sh_pb_to_mask); \ surface_set_shader(_pbox.mask, sh_pb_to_mask); \
draw_surface_safe(_surf, 0, 0); \ draw_surface_safe(_surf); \
surface_reset_shader(); \ surface_reset_shader(); \
\ \
return _pbox; \ return _pbox; \

View file

@ -105,7 +105,7 @@ function Node_PB_Fx_Highlight(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _grou
shader_set_f("seed", _seed); shader_set_f("seed", _seed);
DRAW_CLEAR DRAW_CLEAR
draw_surface_safe(_pbox.content, 0, 0); draw_surface_safe(_pbox.content);
surface_reset_shader(); surface_reset_shader();
return _nbox; return _nbox;

View file

@ -62,7 +62,7 @@ function Node_Pixel_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
shader_set_i("curve_amount", array_length(_data[6])); shader_set_i("curve_amount", array_length(_data[6]));
shader_set_f("randomAmount", _data[7]); shader_set_f("randomAmount", _data[7]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -53,7 +53,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
if(_it <= 0) { if(_it <= 0) {
surface_set_target(_outSurf); surface_set_target(_outSurf);
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_surface_safe(_in, 0, 0); draw_surface_safe(_in);
BLEND_NORMAL; BLEND_NORMAL;
surface_reset_target(); surface_reset_target();
@ -69,7 +69,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_set_target(pp[1]); surface_set_target(pp[1]);
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_surface_safe(_in, 0, 0); draw_surface_safe(_in);
BLEND_NORMAL; BLEND_NORMAL;
surface_reset_target(); surface_reset_target();
@ -87,7 +87,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE; BLEND_OVERRIDE;
shader_set_uniform_f(uniform_itr, i); shader_set_uniform_f(uniform_itr, i);
draw_surface_safe(sDraw, 0, 0); draw_surface_safe(sDraw);
BLEND_NORMAL; BLEND_NORMAL;
surface_reset_target(); surface_reset_target();
} }
@ -96,7 +96,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
surface_set_target(_outSurf); surface_set_target(_outSurf);
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_surface_safe(sBase, 0, 0); draw_surface_safe(sBase);
BLEND_NORMAL; BLEND_NORMAL;
surface_reset_target(); surface_reset_target();

View file

@ -64,7 +64,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
shader_set_i("swap", _data[10]); shader_set_i("swap", _data[10]);
shader_set_2("tile", _data[12]); shader_set_2("tile", _data[12]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -80,11 +80,11 @@ function Node_Posterize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
temp_surface[i] = surface_verify(temp_surface[i], _sw, _sh); temp_surface[i] = surface_verify(temp_surface[i], _sw, _sh);
surface_set_shader(temp_surface[0]); surface_set_shader(temp_surface[0]);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
surface_set_shader(temp_surface[1]); surface_set_shader(temp_surface[1]);
draw_surface(_surf, 0, 0); draw_surface_safe(_surf);
surface_reset_shader(); surface_reset_shader();
surface_clear(temp_surface[2]); surface_clear(temp_surface[2]);

View file

@ -117,10 +117,10 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
if(random(1) < 0.5) { if(random(1) < 0.5) {
shader_set(sh_rsh_rotate); shader_set(sh_rsh_rotate);
shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("dimension", _dim[0], _dim[1]);
draw_surface_safe(_surf, 0, 0); draw_surface_safe(_surf);
shader_reset(); shader_reset();
} else } else
draw_surface_safe(_surf, 0, 0); draw_surface_safe(_surf);
BLEND_SUBTRACT BLEND_SUBTRACT
draw_surface_safe(_subs, _sx - _size[0] / 2, _sy - _size[1] / 2); draw_surface_safe(_subs, _sx - _size[0] / 2, _sy - _size[1] / 2);
@ -144,7 +144,7 @@ function Node_Random_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
shader_set_f("dimension", _dim[0], _dim[1]); shader_set_f("dimension", _dim[0], _dim[1]);
shader_set_i("type", choose(0, 0, 1, 1, 1)); shader_set_i("type", choose(0, 0, 1, 1, 1));
draw_surface_safe(_prog, 0, 0); draw_surface_safe(_prog);
if(_side == 1) draw_surface_ext_safe(_prog, 0, _dim[1], 1, -1, 0, c_white, 1); if(_side == 1) draw_surface_ext_safe(_prog, 0, _dim[1], 1, -1, 0, c_white, 1);
if(_side == 2) draw_surface_ext_safe(_prog, _dim[0], 0, -1, 1, 0, c_white, 1); if(_side == 2) draw_surface_ext_safe(_prog, _dim[0], 0, -1, 1, 0, c_white, 1);
surface_reset_shader(); surface_reset_shader();

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"node_registry", "%Name":"node_registry",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -346,7 +346,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr
shader_set_uniform_f(uni_dim, ww, hh); shader_set_uniform_f(uni_dim, ww, hh);
shader_set_uniform_f(uni_com, cmX, cmY); shader_set_uniform_f(uni_com, cmX, cmY);
draw_surface_safe(_tex, 0, 0); draw_surface_safe(_tex);
shader_reset(); shader_reset();
surface_reset_target(); surface_reset_target();

View file

@ -44,7 +44,7 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
_outSurf = surface_verify(_outSurf, sw, sh, cDep); _outSurf = surface_verify(_outSurf, sw, sh, cDep);
surface_set_shader(temp_surface[0], sh_sdf_tex); surface_set_shader(temp_surface[0], sh_sdf_tex);
draw_surface_safe(inSurf, 0, 0); draw_surface_safe(inSurf);
surface_reset_shader(); surface_reset_shader();
var _step = ceil(log2(_n)); var _step = ceil(log2(_n));
@ -59,14 +59,14 @@ function Node_SDF(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) const
shader_set_uniform_f(uniform_sdf_dim, _n, _n ); shader_set_uniform_f(uniform_sdf_dim, _n, _n );
shader_set_uniform_f(uniform_sdf_stp, stepSize); shader_set_uniform_f(uniform_sdf_stp, stepSize);
shader_set_uniform_i(uniform_sdf_sid, _side); shader_set_uniform_i(uniform_sdf_sid, _side);
draw_surface_safe(temp_surface[!bg], 0, 0); draw_surface_safe(temp_surface[!bg]);
surface_reset_shader(); surface_reset_shader();
} }
surface_set_shader(_outSurf, sh_sdf_dist); surface_set_shader(_outSurf, sh_sdf_dist);
shader_set_uniform_i(uniform_dst_sid, _side); shader_set_uniform_i(uniform_dst_sid, _side);
shader_set_uniform_f(uniform_dst_dst, _dist); shader_set_uniform_f(uniform_dst_dst, _dist);
draw_surface_safe(temp_surface[bg], 0, 0); draw_surface_safe(temp_surface[bg]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -80,7 +80,7 @@ function Node_Shadow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
BLEND_OVERRIDE; BLEND_OVERRIDE;
draw_surface_ext_safe(surface_apply_gaussian(pass1, _size, false, cl), 0, 0, 1, 1, 0, cl, _stre * _color_get_alpha(cl)); draw_surface_ext_safe(surface_apply_gaussian(pass1, _size, false, cl), 0, 0, 1, 1, 0, cl, _stre * _color_get_alpha(cl));
BLEND_NORMAL; BLEND_NORMAL;
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_target(); surface_reset_target();
surface_free(pass1); surface_free(pass1);

View file

@ -82,7 +82,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
shader_set_i("axis", _data[1]); shader_set_i("axis", _data[1]);
shader_set_f_map("amount", _data[2], _data[12], inputs[| 2]); shader_set_f_map("amount", _data[2], _data[12], inputs[| 2]);
shader_set_i("sampleMode", _samp); shader_set_i("sampleMode", _samp);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -91,7 +91,7 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
shader_set_i("modulateStr", _data[12]); shader_set_i("modulateStr", _data[12]);
shader_set_f("spread", _data[13]); shader_set_f("spread", _data[13]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -64,7 +64,7 @@ function Node_Smoke_Repulse(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group)
with(_dom) { with(_dom) {
fd_rectangle_set_target(id, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY); fd_rectangle_set_target(id, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY);
draw_surface_safe(vSurface, 0, 0); draw_surface_safe(vSurface);
fd_rectangle_reset_target(id); fd_rectangle_reset_target(id);
} }

View file

@ -60,7 +60,7 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro
surface_reset_target(); surface_reset_target();
fd_rectangle_set_target(_dom, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY); fd_rectangle_set_target(_dom, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY);
draw_surface_safe(vSurface, 0, 0); draw_surface_safe(vSurface);
fd_rectangle_reset_target(_dom); fd_rectangle_reset_target(_dom);
surface_free(vSurface); surface_free(vSurface);

View file

@ -70,7 +70,7 @@ function Node_Smoke_Vortex(_x, _y, _group = noone) : Node_Smoke(_x, _y, _group)
with(_dom) { with(_dom) {
fd_rectangle_set_target(id, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY); fd_rectangle_set_target(id, _mod? FD_TARGET_TYPE.ADD_VELOCITY : FD_TARGET_TYPE.REPLACE_VELOCITY);
draw_surface_safe(vSurface, 0, 0); draw_surface_safe(vSurface);
fd_rectangle_reset_target(id); fd_rectangle_reset_target(id);
} }

View file

@ -89,7 +89,7 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]); shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]);
shader_set_i("sampleMode", sam); shader_set_i("sampleMode", sam);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
__process_mask_modifier(_data); __process_mask_modifier(_data);

View file

@ -127,7 +127,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
shader_set_f("fdimension", sw, sh); shader_set_f("fdimension", sw, sh);
shader_set_f("position", sx + _padd[PADDING.left], sy + _padd[PADDING.top]); shader_set_f("position", sx + _padd[PADDING.left], sy + _padd[PADDING.top]);
draw_surface(temp_surface[ppind], 0, 0); draw_surface_safe(temp_surface[ppind]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_shader(); surface_reset_shader();
@ -143,7 +143,7 @@ function Node_Stack(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
DRAW_CLEAR DRAW_CLEAR
BLEND_OVERRIDE BLEND_OVERRIDE
draw_surface(temp_surface[ppind], 0, 0); draw_surface_safe(temp_surface[ppind]);
BLEND_NORMAL BLEND_NORMAL
surface_reset_target(); surface_reset_target();

View file

@ -55,7 +55,7 @@ function Node_Time_Remap(_x, _y, _group = noone) : Node(_x, _y, _group) construc
shader_set_uniform_f(uniform_min, i * ste); shader_set_uniform_f(uniform_min, i * ste);
shader_set_uniform_f(uniform_max, i * ste + ste); shader_set_uniform_f(uniform_max, i * ste + ste);
draw_surface_safe(s, 0, 0); draw_surface_safe(s);
} }
surface_reset_shader(); surface_reset_shader();

View file

@ -1,5 +1,5 @@
{ {
"$GMScript":"", "$GMScript":"v1",
"%Name":"node_value", "%Name":"node_value",
"isCompatibility":false, "isCompatibility":false,
"isDnD":false, "isDnD":false,

View file

@ -33,7 +33,7 @@ function Node_Vignette(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
shader_set_f("amplitude", _data[4]); shader_set_f("amplitude", _data[4]);
shader_set_f("smoothness", _data[5]); shader_set_f("smoothness", _data[5]);
draw_surface_safe(_data[0], 0, 0); draw_surface_safe(_data[0]);
surface_reset_shader(); surface_reset_shader();
return _outSurf; return _outSurf;

View file

@ -116,7 +116,7 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
warpSurface( warp_surface[0], warp_surface[1], params.w, params.h, tl, tr, bl, br, true ); warpSurface( warp_surface[0], warp_surface[1], params.w, params.h, tl, tr, bl, br, true );
BLEND_ADD BLEND_ADD
draw_surface(warp_surface[0], 0, 0); draw_surface_safe(warp_surface[0]);
BLEND_NORMAL BLEND_NORMAL
#endregion #endregion

Some files were not shown because too many files have changed in this diff Show more