mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-13 07:47:06 +01:00
1.14pr8.2 patch
This commit is contained in:
parent
d51c4dc25b
commit
241f08251d
14 changed files with 48 additions and 42 deletions
|
@ -527,6 +527,8 @@ event_inherited();
|
||||||
for(var i = 0; i < ds_list_size(NODE_CATEGORY); i++) {
|
for(var i = 0; i < ds_list_size(NODE_CATEGORY); i++) {
|
||||||
var cat = NODE_CATEGORY[| i];
|
var cat = NODE_CATEGORY[| i];
|
||||||
|
|
||||||
|
if(i == NODE_PAGE_DEFAULT)
|
||||||
|
continue;
|
||||||
if(array_length(cat.filter) && !array_exists(cat.filter, context))
|
if(array_length(cat.filter) && !array_exists(cat.filter, context))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region nodes
|
#region render
|
||||||
DEF_SURFACE_RESET();
|
DEF_SURFACE_RESET();
|
||||||
|
|
||||||
var _k = ds_map_find_first(NODE_MAP);
|
var _k = ds_map_find_first(NODE_MAP);
|
||||||
|
|
|
@ -219,7 +219,6 @@ function __part(_node) constructor {
|
||||||
if(blend != c_white) cc = colorMultiply(blend, cc);
|
if(blend != c_white) cc = colorMultiply(blend, cc);
|
||||||
alp_draw = alp * eval_curve_x(alp_fade, lifeRat);
|
alp_draw = alp * eval_curve_x(alp_fade, lifeRat);
|
||||||
|
|
||||||
shader_set_f("sampleDimension", surface_get_width(ss), surface_get_height(ss));
|
|
||||||
draw_surface_ext_safe(ss, _xx, _yy, scx, scy, rot, cc, alp_draw);
|
draw_surface_ext_safe(ss, _xx, _yy, scx, scy, rot, cc, alp_draw);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
||||||
VERSION = 1140;
|
VERSION = 1140;
|
||||||
SAVEFILE_VERSION = 1400;
|
SAVEFILE_VERSION = 1400;
|
||||||
VERSION_STRING = "1.14.0pr8";
|
VERSION_STRING = "1.14.0pr8.2";
|
||||||
|
|
||||||
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
||||||
|
|
||||||
|
|
|
@ -248,16 +248,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
var willUpdate = false;
|
var willUpdate = false;
|
||||||
|
|
||||||
if(ANIMATOR.frame_progress) {
|
if(ANIMATOR.frame_progress) {
|
||||||
if(update_on_frame)
|
if(update_on_frame) willUpdate = true;
|
||||||
willUpdate = true;
|
if(isAnimated()) willUpdate = true;
|
||||||
|
|
||||||
if(isAnimated())
|
if(willUpdate) {
|
||||||
willUpdate = true;
|
setRenderStatus(false);
|
||||||
}
|
UPDATE |= RENDER_TYPE.partial;
|
||||||
|
}
|
||||||
if(willUpdate) {
|
|
||||||
setRenderStatus(false);
|
|
||||||
UPDATE |= RENDER_TYPE.partial;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(auto_height)
|
if(auto_height)
|
||||||
|
@ -352,7 +349,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
if( val_from == noone) continue;
|
if( val_from == noone) continue;
|
||||||
if(!val_from.node.active) continue;
|
if(!val_from.node.active) continue;
|
||||||
if(!val_from.node.renderActive) continue;
|
if(!val_from.node.renderActive) continue;
|
||||||
if(!val_from.node.rendered)
|
if(!val_from.node.rendered && !val_from.node.update_on_frame)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,6 +18,13 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
outParent = undefined;
|
outParent = undefined;
|
||||||
output_index = -1;
|
output_index = -1;
|
||||||
|
|
||||||
|
static setRenderStatus = function(result) {
|
||||||
|
LOG_LINE_IF(global.RENDER_LOG, "Set render status for " + name + " : " + string(result));
|
||||||
|
|
||||||
|
rendered = result;
|
||||||
|
if(group) group.setRenderStatus(result);
|
||||||
|
}
|
||||||
|
|
||||||
static onValueUpdate = function(index = 0) {
|
static onValueUpdate = function(index = 0) {
|
||||||
if(is_undefined(outParent)) return;
|
if(is_undefined(outParent)) return;
|
||||||
|
|
||||||
|
|
|
@ -102,8 +102,8 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
inputs[| 14].setVisible(px);
|
inputs[| 14].setVisible(px);
|
||||||
inputs[| 18].setVisible(px);
|
inputs[| 18].setVisible(px);
|
||||||
|
|
||||||
inputs[| 15].setVisible(_tex);
|
inputs[| 15].setVisible(!_tex);
|
||||||
inputs[| 16].setVisible(_tex);
|
inputs[| 16].setVisible(!_tex);
|
||||||
|
|
||||||
inputs[| 2].setVisible(!_flen);
|
inputs[| 2].setVisible(!_flen);
|
||||||
inputs[| 20].setVisible( _flen);
|
inputs[| 20].setVisible( _flen);
|
||||||
|
@ -238,8 +238,9 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
_ny += lengthdir_y(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90); _sedIndex++;
|
_ny += lengthdir_y(random1D(_sed + _sedIndex, -_wig, _wig), _d + 90); _sedIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_prog_total >= _pathStr) //Do not point before range start. Do this instead of starting at _rtStr to prevent wiggle.
|
if(_prog_total >= _pathStr) { //Do not add point before range start. Do this instead of starting at _rtStr to prevent wiggle.
|
||||||
array_push(points, [ _nx, _ny, _prog_total / _pathEnd, _prog_curr ]);
|
array_push(points, [ _nx, _ny, _prog_total / _pathEnd, _prog_curr / _pathLength ]);
|
||||||
|
}
|
||||||
|
|
||||||
if(_prog_next > _prog_curr) {
|
if(_prog_next > _prog_curr) {
|
||||||
_prog_total += _prog_next - _prog_curr;
|
_prog_total += _prog_next - _prog_curr;
|
||||||
|
|
|
@ -4,7 +4,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
w = 96;
|
w = 96;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 0] = nodeValue("Path progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0, "Sample position from path.")
|
||||||
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
inputs[| 1] = nodeValue("Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
|
||||||
|
|
|
@ -294,7 +294,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
addNodeObject(filter, "Convolution", s_node_convolution, "Node_Convolution", [1, Node_Convolution], ["kernel"], "Apply convolution operation on each pixel using a custom 3x3 kernel.").setVersion(1090);
|
addNodeObject(filter, "Convolution", s_node_convolution, "Node_Convolution", [1, Node_Convolution], ["kernel"], "Apply convolution operation on each pixel using a custom 3x3 kernel.").setVersion(1090);
|
||||||
addNodeObject(filter, "Local Analyze", s_node_local_analyze, "Node_Local_Analyze", [1, Node_Local_Analyze],, "Apply non-linear operation (minimum, maximum) on each pixel locally.").setVersion(1110);
|
addNodeObject(filter, "Local Analyze", s_node_local_analyze, "Node_Local_Analyze", [1, Node_Local_Analyze],, "Apply non-linear operation (minimum, maximum) on each pixel locally.").setVersion(1110);
|
||||||
addNodeObject(filter, "SDF", s_node_sdf, "Node_SDF", [1, Node_SDF],, "Create signed distance field using jump flooding algorithm.").setVersion(1130);
|
addNodeObject(filter, "SDF", s_node_sdf, "Node_SDF", [1, Node_SDF],, "Create signed distance field using jump flooding algorithm.").setVersion(1130);
|
||||||
addNodeObject(filter, "Replace Image", s_node_image_replace, "Node_Surface_Replace", [1, Node_Surface_Replace]).setVersion(1140);
|
addNodeObject(filter, "Replace Image", s_node_image_replace, "Node_Surface_Replace", [1, Node_Surface_Replace], ["image replace"]).setVersion(1140);
|
||||||
addNodeObject(filter, "Chromatic Aberration", s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image.");
|
addNodeObject(filter, "Chromatic Aberration", s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image.");
|
||||||
|
|
||||||
ds_list_add(filter, "Colors");
|
ds_list_add(filter, "Colors");
|
||||||
|
|
|
@ -18,23 +18,23 @@ function Node_Rigid_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro
|
||||||
//physics_world_update_iterations(30);
|
//physics_world_update_iterations(30);
|
||||||
//physics_world_update_speed(100)
|
//physics_world_update_speed(100)
|
||||||
|
|
||||||
//static reset = function() {
|
static reset = function() {
|
||||||
// instance_destroy(oRigidbody);
|
instance_destroy(oRigidbody);
|
||||||
// physics_pause_enable(true);
|
physics_pause_enable(true);
|
||||||
|
|
||||||
// var node_list = getNodeList();
|
var node_list = getNodeList();
|
||||||
// for( var i = 0; i < ds_list_size(node_list); i++ ) {
|
for( var i = 0; i < ds_list_size(node_list); i++ ) {
|
||||||
// var n = node_list[| i];
|
var n = node_list[| i];
|
||||||
// if(variable_struct_exists(n, "reset"))
|
if(variable_struct_exists(n, "reset"))
|
||||||
// n.reset();
|
n.reset();
|
||||||
// }
|
}
|
||||||
// physics_pause_enable(false);
|
physics_pause_enable(false);
|
||||||
//}
|
}
|
||||||
|
|
||||||
//static update = function() {
|
static update = function() {
|
||||||
// if(ANIMATOR.current_frame == 0)
|
if(ANIMATOR.current_frame == 0)
|
||||||
// reset();
|
reset();
|
||||||
//}
|
}
|
||||||
|
|
||||||
PATCH_STATIC
|
PATCH_STATIC
|
||||||
}
|
}
|
|
@ -673,7 +673,7 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
}
|
}
|
||||||
|
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var _shp = inputs[| 5].getValue();
|
var _shp = inputs[| 5].getValue();
|
||||||
inputs[| 9].setVisible(_shp == 2);
|
inputs[| 9].setVisible(_shp == 2);
|
||||||
|
|
||||||
var _tex = inputs[| 6].getValue();
|
var _tex = inputs[| 6].getValue();
|
||||||
|
@ -688,9 +688,6 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
}
|
}
|
||||||
|
|
||||||
static reset = function() {
|
static reset = function() {
|
||||||
var _spwn = inputs[| 8].getValue();
|
|
||||||
if(!_spwn) return;
|
|
||||||
|
|
||||||
var _tex = inputs[| 6].getValue();
|
var _tex = inputs[| 6].getValue();
|
||||||
for( var i = 0; i < array_length(object); i++ ) {
|
for( var i = 0; i < array_length(object); i++ ) {
|
||||||
if(instance_exists(object[i]))
|
if(instance_exists(object[i]))
|
||||||
|
@ -698,6 +695,9 @@ function Node_Rigid_Object(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
}
|
}
|
||||||
object = [];
|
object = [];
|
||||||
|
|
||||||
|
var _spwn = inputs[| 8].getValue();
|
||||||
|
if(!_spwn) return;
|
||||||
|
|
||||||
if(is_array(_tex)) {
|
if(is_array(_tex)) {
|
||||||
for( var i = 0; i < array_length(_tex); i++ )
|
for( var i = 0; i < array_length(_tex); i++ )
|
||||||
object[i] = spawn(noone, i);
|
object[i] = spawn(noone, i);
|
||||||
|
|
|
@ -180,9 +180,9 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
rendering = ds_queue_dequeue(RENDER_QUEUE);
|
rendering = ds_queue_dequeue(RENDER_QUEUE);
|
||||||
if(rendering.group == context) break;
|
if(rendering.group == context) break;
|
||||||
|
|
||||||
var txt = rendering.rendered? " [Skip]" : " [Update]";
|
var txt = rendering.isRenderable()? " [Skip]" : " [Update]";
|
||||||
|
|
||||||
if(!rendering.rendered) {
|
if(!rendering.isRenderable()) {
|
||||||
rendering.doUpdate();
|
rendering.doUpdate();
|
||||||
if(rendering.hasInspector1Update()) {
|
if(rendering.hasInspector1Update()) {
|
||||||
rendering.inspector1Update();
|
rendering.inspector1Update();
|
||||||
|
|
|
@ -19,5 +19,5 @@ void main() {
|
||||||
|
|
||||||
col /= down * down;
|
col /= down * down;
|
||||||
|
|
||||||
gl_FragColor = col;
|
gl_FragColor = col * v_vColour;
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,5 +53,5 @@ vec4 texture2Dintp( sampler2D texture, vec2 uv ) {
|
||||||
/////////////// SAMPLING ///////////////
|
/////////////// SAMPLING ///////////////
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
gl_FragColor = texture2Dintp( gm_BaseTexture, v_vTexcoord );
|
gl_FragColor = texture2Dintp( gm_BaseTexture, v_vTexcoord ) * v_vColour;
|
||||||
}
|
}
|
Loading…
Reference in a new issue