This commit is contained in:
Tanasart 2024-02-18 11:41:15 +07:00
parent c245c54abc
commit 4368e8ddb8
13 changed files with 31 additions and 47 deletions

View file

@ -417,7 +417,7 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"mf.dll","CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"mfcore.dll","CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"mfplat.dll","CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"pxc","CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"pxc.exe","CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"README.txt","ConfigValues":{"Itch":{"CopyToMask":"0",},},"CopyToMask":-1,"filePath":"datafiles",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"data.win","CopyToMask":-1,"filePath":"datafiles/report",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"execute_shell_simple_ext_x64.dll","CopyToMask":-1,"filePath":"datafiles/report",},

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 58 KiB

View file

@ -28,9 +28,9 @@
k.z = power(k.z, 3);
var rg = global.CVTMAT_OKLAB_RGB.multiplyVector(k);
rg.x = power(rg.x, 1 / 2.2);
rg.y = power(rg.y, 1 / 2.2);
rg.z = power(rg.z, 1 / 2.2);
rg.x = power(rg.x, 1 / 2.2) * 255;
rg.y = power(rg.y, 1 / 2.2) * 255;
rg.z = power(rg.z, 1 / 2.2) * 255;
return make_color_rgba(rg.x, rg.y, rg.z, a);
} #endregion

View file

@ -17,15 +17,18 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
input_display_list = [ 3, 0, 1, 2 ];
static processData = function(_output, _data, _output_index, _array_index = 0) {
var c = c_black;
switch(_data[3]) {
case 0 : return merge_color_ext(_data[0], _data[1], _data[2]);
case 1 : return merge_color_hsv(_data[0], _data[1], _data[2]);
case 2 : return merge_color_oklab(_data[0], _data[1], _data[2]);
case 0 : c = merge_color_ext( _data[0], _data[1], _data[2]); break;
case 1 : c = merge_color_hsv( _data[0], _data[1], _data[2]); break;
case 2 : c = merge_color_oklab(_data[0], _data[1], _data[2]); break;
}
return c;
}
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
var bbox = drawGetBbox(xx, yy, _s);
if(bbox.h < 1) return;
@ -37,5 +40,5 @@ function Node_Color_Mix(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
}
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
}
} #endregion
}

View file

@ -117,7 +117,7 @@ function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
if(array_empty(spr)) return;
var _arr = is_array(spr);
var _arr = is_array(spr) && array_length(spr) > 1;
var _outsurf = outputs[| 0].getValue();
if(!is_array(_outsurf)) _outsurf = [ _outsurf ];

View file

@ -98,13 +98,13 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
draw_surface_safe(temp_surface[1]);
surface_reset_shader();
}
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_init);
draw_surface_safe(temp_surface[2]);
surface_reset_shader();
#endregion
#region coordinate
surface_set_shader(temp_surface[base], sh_region_fill_coordinate_init);
draw_surface_safe(temp_surface[2]);
surface_reset_shader();
base = !base;
var amo = _sw + _sh;
@ -120,7 +120,7 @@ function Node_Region_Fill(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
}
surface_set_shader(temp_surface[base], sh_region_fill_border);
shader_set_f("dimension", _sw, _sh);
shader_set_f("dimension", _sw, _sh);
shader_set_surface("original", _surf);
draw_surface_safe(temp_surface[!base]);

View file

@ -715,7 +715,7 @@ function __initNodes() {
addNodeObject(generator, "StrandSim", s_node_strandSim, "Node_Strand_Group_Inline", [1, Node_Strand_Group_Inline], ["hair"], "Create group for hair simulation.").setVersion(1140);
addNodeObject(generator, "Diffuse", s_node_diffuse, "Node_Diffuse", [1, Node_Diffuse],, "Simulate diffusion like simulation.").setVersion(11640);
addNodeObject(generator, "Reaction Diffusion", s_node_reaction_diffusion, "Node_RD", [1, Node_RD],, "Simulate reaction diffusion effect.").setVersion(11630);
ds_list_add(generator, "Region");
addNodeObject(generator, "Separate Shape", s_node_sepearte_shape, "Node_Seperate_Shape", [1, Node_Seperate_Shape],, "Separate disconnected pixel each into an image in an image array.");
addNodeObject(generator, "Region Fill", s_node_region_fill, "Node_Region_Fill", [1, Node_Region_Fill],, "Fill connected pixel with colors.").setVersion(1147);

View file

@ -6,24 +6,6 @@ varying vec4 v_vColour;
uniform sampler2D base;
uniform vec2 dimension;
vec2 less ( vec2 a, vec2 b ) { #region
if(b == vec2(0.)) return a;
if(a == vec2(0.)) return b;
if(a.y < b.y) return a;
else if(a.y > b.y) return b;
else return a.x < b.x? a : b;
} #endregion
vec2 more ( vec2 a, vec2 b ) { #region
if(b == vec2(0.)) return a;
if(a == vec2(0.)) return b;
if(a.y > b.y) return a;
else if(a.y < b.y) return b;
else return a.x > b.x? a : b;
} #endregion
void main() {
vec2 tx = 1. / dimension;
vec4 c = texture2D( gm_BaseTexture, v_vTexcoord );
@ -40,12 +22,12 @@ void main() {
if(x.x < 0. || x.y < 0. || x.x > 1. || x.y > 1.) break;
vec4 s = texture2D( gm_BaseTexture, x );
vec4 b = texture2D( base, x );
vec4 b = texture2D( base, x );
if(b.a == 0.) break;
gl_FragColor.xy = less( gl_FragColor.xy, s.xy );
gl_FragColor.zw = more( gl_FragColor.zw, s.zw );
gl_FragColor.xy = min( gl_FragColor.xy, s.xy );
gl_FragColor.zw = max( gl_FragColor.zw, s.zw );
}
for( float i = 1.; i < ITERATION; i++ ) {
@ -53,12 +35,12 @@ void main() {
if(x.x < 0. || x.y < 0. || x.x > 1. || x.y > 1.) break;
vec4 s = texture2D( gm_BaseTexture, x );
vec4 b = texture2D( base, x );
vec4 b = texture2D( base, x );
if(b.a == 0.) break;
gl_FragColor.xy = less( gl_FragColor.xy, s.xy );
gl_FragColor.zw = more( gl_FragColor.zw, s.zw );
gl_FragColor.xy = min( gl_FragColor.xy, s.xy );
gl_FragColor.zw = max( gl_FragColor.zw, s.zw );
}
for( float i = 1.; i < ITERATION; i++ ) {
@ -66,12 +48,12 @@ void main() {
if(x.x < 0. || x.y < 0. || x.x > 1. || x.y > 1.) break;
vec4 s = texture2D( gm_BaseTexture, x );
vec4 b = texture2D( base, x );
vec4 b = texture2D( base, x );
if(b.a == 0.) break;
gl_FragColor.xy = less( gl_FragColor.xy, s.xy );
gl_FragColor.zw = more( gl_FragColor.zw, s.zw );
gl_FragColor.xy = min( gl_FragColor.xy, s.xy );
gl_FragColor.zw = max( gl_FragColor.zw, s.zw );
}
for( float i = 1.; i < ITERATION; i++ ) {
@ -79,11 +61,11 @@ void main() {
if(x.x < 0. || x.y < 0. || x.x > 1. || x.y > 1.) break;
vec4 s = texture2D( gm_BaseTexture, x );
vec4 b = texture2D( base, x );
vec4 b = texture2D( base, x );
if(b.a == 0.) break;
gl_FragColor.xy = less( gl_FragColor.xy, s.xy );
gl_FragColor.zw = more( gl_FragColor.zw, s.zw );
gl_FragColor.xy = min( gl_FragColor.xy, s.xy );
gl_FragColor.zw = max( gl_FragColor.zw, s.zw );
}
}

View file

@ -13,5 +13,4 @@ void main() {
vec2 t = (v_vTexcoord - c.xy) / (c.zw - c.xy);
gl_FragColor = texture2D( textureMap, t );
gl_FragColor = vec4( t, 0., 1. );
}