mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-26 06:56:45 +01:00
Fix
This commit is contained in:
parent
7de5a3a7be
commit
3f3789c54d
11 changed files with 127 additions and 25 deletions
|
@ -609,6 +609,7 @@
|
||||||
{"name":"sh_draw_texture","order":6,"path":"shaders/sh_draw_texture/sh_draw_texture.yy",},
|
{"name":"sh_draw_texture","order":6,"path":"shaders/sh_draw_texture/sh_draw_texture.yy",},
|
||||||
{"name":"d3d_terrain","order":8,"path":"scripts/d3d_terrain/d3d_terrain.yy",},
|
{"name":"d3d_terrain","order":8,"path":"scripts/d3d_terrain/d3d_terrain.yy",},
|
||||||
{"name":"fd_rectangle_get_pressure_width","order":18,"path":"scripts/fd_rectangle_get_pressure_width/fd_rectangle_get_pressure_width.yy",},
|
{"name":"fd_rectangle_get_pressure_width","order":18,"path":"scripts/fd_rectangle_get_pressure_width/fd_rectangle_get_pressure_width.yy",},
|
||||||
|
{"name":"node_mk_flag","order":5,"path":"scripts/node_mk_flag/node_mk_flag.yy",},
|
||||||
{"name":"sh_blend_normal","order":1,"path":"shaders/sh_blend_normal/sh_blend_normal.yy",},
|
{"name":"sh_blend_normal","order":1,"path":"shaders/sh_blend_normal/sh_blend_normal.yy",},
|
||||||
{"name":"node_feedback_output","order":2,"path":"scripts/node_feedback_output/node_feedback_output.yy",},
|
{"name":"node_feedback_output","order":2,"path":"scripts/node_feedback_output/node_feedback_output.yy",},
|
||||||
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
|
{"name":"node_lua_surface","order":2,"path":"scripts/node_lua_surface/node_lua_surface.yy",},
|
||||||
|
@ -766,6 +767,7 @@
|
||||||
{"name":"polygon_points","order":2,"path":"scripts/polygon_points/polygon_points.yy",},
|
{"name":"polygon_points","order":2,"path":"scripts/polygon_points/polygon_points.yy",},
|
||||||
{"name":"transformBox","order":15,"path":"scripts/transformBox/transformBox.yy",},
|
{"name":"transformBox","order":15,"path":"scripts/transformBox/transformBox.yy",},
|
||||||
{"name":"sh_grey_alpha","order":12,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},
|
{"name":"sh_grey_alpha","order":12,"path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},
|
||||||
|
{"name":"node_mk_cable","order":4,"path":"scripts/node_mk_cable/node_mk_cable.yy",},
|
||||||
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
|
{"name":"s_node_time_map","order":39,"path":"sprites/s_node_time_map/s_node_time_map.yy",},
|
||||||
{"name":"node_crop","order":7,"path":"scripts/node_crop/node_crop.yy",},
|
{"name":"node_crop","order":7,"path":"scripts/node_crop/node_crop.yy",},
|
||||||
{"name":"s_biterator_tab_content","order":14,"path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},
|
{"name":"s_biterator_tab_content","order":14,"path":"sprites/s_biterator_tab_content/s_biterator_tab_content.yy",},
|
||||||
|
|
|
@ -1222,6 +1222,7 @@
|
||||||
{"id":{"name":"sh_draw_texture","path":"shaders/sh_draw_texture/sh_draw_texture.yy",},},
|
{"id":{"name":"sh_draw_texture","path":"shaders/sh_draw_texture/sh_draw_texture.yy",},},
|
||||||
{"id":{"name":"d3d_terrain","path":"scripts/d3d_terrain/d3d_terrain.yy",},},
|
{"id":{"name":"d3d_terrain","path":"scripts/d3d_terrain/d3d_terrain.yy",},},
|
||||||
{"id":{"name":"fd_rectangle_get_pressure_width","path":"scripts/fd_rectangle_get_pressure_width/fd_rectangle_get_pressure_width.yy",},},
|
{"id":{"name":"fd_rectangle_get_pressure_width","path":"scripts/fd_rectangle_get_pressure_width/fd_rectangle_get_pressure_width.yy",},},
|
||||||
|
{"id":{"name":"node_mk_flag","path":"scripts/node_mk_flag/node_mk_flag.yy",},},
|
||||||
{"id":{"name":"s_node_strandSim_render","path":"sprites/s_node_strandSim_render/s_node_strandSim_render.yy",},},
|
{"id":{"name":"s_node_strandSim_render","path":"sprites/s_node_strandSim_render/s_node_strandSim_render.yy",},},
|
||||||
{"id":{"name":"sh_blend_normal","path":"shaders/sh_blend_normal/sh_blend_normal.yy",},},
|
{"id":{"name":"sh_blend_normal","path":"shaders/sh_blend_normal/sh_blend_normal.yy",},},
|
||||||
{"id":{"name":"node_feedback_output","path":"scripts/node_feedback_output/node_feedback_output.yy",},},
|
{"id":{"name":"node_feedback_output","path":"scripts/node_feedback_output/node_feedback_output.yy",},},
|
||||||
|
@ -1407,6 +1408,7 @@
|
||||||
{"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},},
|
{"id":{"name":"transformBox","path":"scripts/transformBox/transformBox.yy",},},
|
||||||
{"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},},
|
{"id":{"name":"s_node_fluidSim_group","path":"sprites/s_node_fluidSim_group/s_node_fluidSim_group.yy",},},
|
||||||
{"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},},
|
{"id":{"name":"sh_grey_alpha","path":"shaders/sh_grey_alpha/sh_grey_alpha.yy",},},
|
||||||
|
{"id":{"name":"node_mk_cable","path":"scripts/node_mk_cable/node_mk_cable.yy",},},
|
||||||
{"id":{"name":"sh_normal","path":"shaders/sh_normal/sh_normal.yy",},},
|
{"id":{"name":"sh_normal","path":"shaders/sh_normal/sh_normal.yy",},},
|
||||||
{"id":{"name":"s_node_time_map","path":"sprites/s_node_time_map/s_node_time_map.yy",},},
|
{"id":{"name":"s_node_time_map","path":"sprites/s_node_time_map/s_node_time_map.yy",},},
|
||||||
{"id":{"name":"node_crop","path":"scripts/node_crop/node_crop.yy",},},
|
{"id":{"name":"node_crop","path":"scripts/node_crop/node_crop.yy",},},
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||||
|
|
||||||
LATEST_VERSION = 11500;
|
LATEST_VERSION = 11500;
|
||||||
VERSION = 11587;
|
VERSION = 11588;
|
||||||
SAVE_VERSION = 11600;
|
SAVE_VERSION = 11600;
|
||||||
VERSION_STRING = "1.16rc7";
|
VERSION_STRING = "1.16rc8";
|
||||||
BUILD_NUMBER = 11587;
|
BUILD_NUMBER = 11588;
|
||||||
|
|
||||||
globalvar APPEND_MAP;
|
globalvar APPEND_MAP;
|
||||||
APPEND_MAP = ds_map_create();
|
APPEND_MAP = ds_map_create();
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "Glow";
|
name = "Glow";
|
||||||
|
|
||||||
shader = sh_outline_only;
|
|
||||||
uniform_dim = shader_get_uniform(shader, "dimension");
|
|
||||||
uniform_size = shader_get_uniform(shader, "borderSize");
|
|
||||||
uniform_colr = shader_get_uniform(shader, "borderColor");
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 1] = nodeValue("Border", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
@ -52,30 +47,33 @@ function Node_Glow(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
|
|
||||||
surface_set_target(pass1);
|
surface_set_target(pass1);
|
||||||
draw_clear_alpha(c_black, 1);
|
draw_clear_alpha(c_black, 1);
|
||||||
shader_set(shader);
|
shader_set(sh_outline_only);
|
||||||
shader_set_uniform_f_array_safe(uniform_dim, [ surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf) ]);
|
shader_set_f("dimension", [ surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf) ]);
|
||||||
shader_set_uniform_f(uniform_size, _size + _border);
|
shader_set_f("borderSize", _size + _border);
|
||||||
shader_set_uniform_f_array_safe(uniform_colr, [ 1., 1., 1., 1. ]);
|
shader_set_f("borderColor", [ 1., 1., 1., 1. ]);
|
||||||
|
|
||||||
if(is_surface(_data[0])) draw_surface_safe(_data[0], 0, 0);
|
if(is_surface(_data[0])) draw_surface_safe(_data[0], 0, 0);
|
||||||
shader_reset();
|
shader_reset();
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
||||||
|
var s = surface_apply_gaussian(pass1, _size, false, c_black, 1, noone);
|
||||||
|
|
||||||
surface_set_target(_outSurf);
|
surface_set_target(_outSurf);
|
||||||
DRAW_CLEAR
|
DRAW_CLEAR
|
||||||
BLEND_OVERRIDE;
|
BLEND_OVERRIDE
|
||||||
|
|
||||||
var s = surface_apply_gaussian(pass1, _size, false, c_black, 0);
|
|
||||||
|
|
||||||
shader_set(sh_lum2alpha);
|
shader_set(sh_lum2alpha);
|
||||||
shader_set_uniform_f_array_safe(shader_get_uniform(sh_lum2alpha, "color"), colToVec4(cl));
|
shader_set_color("color", cl);
|
||||||
draw_surface_ext_safe(s, 0, 0, 1, 1, 0, c_white, _stre);
|
shader_set_f("intensity", _stre);
|
||||||
|
draw_surface_ext_safe(s, 0, 0, 1, 1, 0, c_white, 1);
|
||||||
shader_reset();
|
shader_reset();
|
||||||
|
|
||||||
BLEND_NORMAL;
|
BLEND_ALPHA_MULP
|
||||||
|
|
||||||
draw_surface_safe(_data[0], 0, 0);
|
draw_surface_safe(_data[0], 0, 0);
|
||||||
|
BLEND_NORMAL
|
||||||
|
|
||||||
surface_reset_target();
|
surface_reset_target();
|
||||||
|
|
||||||
surface_free(pass1);
|
surface_free(pass1);
|
||||||
surface_free(s);
|
surface_free(s);
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
prop = _prop;
|
prop = _prop;
|
||||||
y = 0;
|
y = 0;
|
||||||
key_map = array_create(TOTAL_FRAMES);
|
key_map = array_create(TOTAL_FRAMES);
|
||||||
|
key_map_mode = KEYFRAME_END.hold;
|
||||||
|
|
||||||
animate_frames = [];
|
animate_frames = [];
|
||||||
|
|
||||||
|
@ -116,6 +117,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
}
|
}
|
||||||
|
|
||||||
var _len = max(TOTAL_FRAMES, values[| ds_list_size(values) - 1].time);
|
var _len = max(TOTAL_FRAMES, values[| ds_list_size(values) - 1].time);
|
||||||
|
key_map_mode = prop.on_end;
|
||||||
|
|
||||||
if(array_length(key_map) != _len)
|
if(array_length(key_map) != _len)
|
||||||
array_resize(key_map, _len);
|
array_resize(key_map, _len);
|
||||||
|
@ -277,7 +279,10 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
var _keyIndex = _time >= _len? 999_999 : key_map[_time];
|
var _keyIndex;
|
||||||
|
if(_time >= _len) _keyIndex = 999_999;
|
||||||
|
else if(_time < _len) _keyIndex = 0;
|
||||||
|
else _keyIndex = key_map[_time];
|
||||||
|
|
||||||
if(_keyIndex == -1) { #region Before first key
|
if(_keyIndex == -1) { #region Before first key
|
||||||
if(prop.on_end == KEYFRAME_END.wrap) {
|
if(prop.on_end == KEYFRAME_END.wrap) {
|
||||||
|
@ -300,7 +305,7 @@ function valueAnimator(_val, _prop, _sep_axis = false) constructor {
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
if(_keyIndex == 999_999) { #region After last key
|
if(_keyIndex == 999_999) { #region After last key
|
||||||
if(_keyIndex == KEYFRAME_END.wrap) {
|
if(prop.on_end == KEYFRAME_END.wrap) {
|
||||||
var from = values[| ds_list_size(values) - 1];
|
var from = values[| ds_list_size(values) - 1];
|
||||||
var to = values[| 0];
|
var to = values[| 0];
|
||||||
var prog = _time - from.time;
|
var prog = _time - from.time;
|
||||||
|
|
36
scripts/node_mk_cable/node_mk_cable.gml
Normal file
36
scripts/node_mk_cable/node_mk_cable.gml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
function Node_MK_Cable(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "MK Cable";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Point 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Point 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
input_display_list = [ 0,
|
||||||
|
["Saber", false], 1, 2,
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||||
|
var _a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a;
|
||||||
|
var _a = inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _dim = _data[0];
|
||||||
|
var _pnt1 = _data[1];
|
||||||
|
var _pnt2 = _data[2];
|
||||||
|
|
||||||
|
surface_set_target(_outSurf);
|
||||||
|
DRAW_CLEAR
|
||||||
|
|
||||||
|
surface_reset_target();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_mk_cable/node_mk_cable.yy
Normal file
11
scripts/node_mk_cable/node_mk_cable.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_mk_cable",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "MK effects",
|
||||||
|
"path": "folders/nodes/data/MK effects.yy",
|
||||||
|
},
|
||||||
|
}
|
36
scripts/node_mk_flag/node_mk_flag.gml
Normal file
36
scripts/node_mk_flag/node_mk_flag.gml
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
function Node_MK_Flag(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "MK Flag";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Point 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Point 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
input_display_list = [ 0,
|
||||||
|
["Saber", false], 1, 2,
|
||||||
|
];
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||||
|
var _a = inputs[| 1].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a;
|
||||||
|
var _a = inputs[| 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny); active &= _a;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _dim = _data[0];
|
||||||
|
var _pnt1 = _data[1];
|
||||||
|
var _pnt2 = _data[2];
|
||||||
|
|
||||||
|
surface_set_target(_outSurf);
|
||||||
|
DRAW_CLEAR
|
||||||
|
|
||||||
|
surface_reset_target();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_mk_flag/node_mk_flag.yy
Normal file
11
scripts/node_mk_flag/node_mk_flag.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_mk_flag",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "MK effects",
|
||||||
|
"path": "folders/nodes/data/MK effects.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -142,8 +142,8 @@ function slider(_min, _max, _step, _onModify = noone, _onRelease = noone) : widg
|
||||||
if(key_mod_press(CTRL)) amo *= 10;
|
if(key_mod_press(CTRL)) amo *= 10;
|
||||||
if(key_mod_press(ALT)) amo /= 10;
|
if(key_mod_press(ALT)) amo /= 10;
|
||||||
|
|
||||||
if(mouse_wheel_down()) modifyValue(_data + amo * SCROLL_SPEED);
|
if(key_mod_press(SHIFT) && mouse_wheel_down()) modifyValue(_data + amo * SCROLL_SPEED);
|
||||||
if(mouse_wheel_up()) modifyValue(_data - amo * SCROLL_SPEED);
|
if(key_mod_press(SHIFT) && mouse_wheel_up()) modifyValue(_data - amo * SCROLL_SPEED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,13 @@ varying vec2 v_vTexcoord;
|
||||||
varying vec4 v_vColour;
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
uniform vec4 color;
|
uniform vec4 color;
|
||||||
|
uniform float intensity;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
vec4 samp = texture2D( gm_BaseTexture, v_vTexcoord );
|
vec4 samp = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||||
float bright = dot(samp.rgb, vec3(0.2126, 0.7152, 0.0722));
|
float bright = dot(samp.rgb, vec3(0.2126, 0.7152, 0.0722));
|
||||||
vec4 col = v_vColour * color;
|
vec4 col = color;
|
||||||
col.a *= bright;
|
col.a *= bright * intensity;
|
||||||
|
|
||||||
gl_FragColor = col;
|
gl_FragColor = col;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue