mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
shader set vec2
This commit is contained in:
parent
c0c640f602
commit
fdf245c1a9
46 changed files with 280 additions and 91 deletions
|
@ -1643,6 +1643,7 @@
|
|||
{"name":"s_node_3d_obj_combine","order":5,"path":"sprites/s_node_3d_obj_combine/s_node_3d_obj_combine.yy",},
|
||||
{"name":"s_node_3d_obj_export","order":30,"path":"sprites/s_node_3d_obj_export/s_node_3d_obj_export.yy",},
|
||||
{"name":"s_node_3d_obj","order":3,"path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",},
|
||||
{"name":"s_node_3d_path_extrude","order":31,"path":"sprites/s_node_3d_path_extrude/s_node_3d_path_extrude.yy",},
|
||||
{"name":"s_node_3d_plane","order":6,"path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},
|
||||
{"name":"s_node_3d_point_affector","order":21,"path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},
|
||||
{"name":"s_node_3d_scene","order":14,"path":"sprites/s_node_3d_scene/s_node_3d_scene.yy",},
|
||||
|
@ -1900,6 +1901,7 @@
|
|||
{"name":"s_node_palette","order":14,"path":"sprites/s_node_palette/s_node_palette.yy",},
|
||||
{"name":"s_node_particle_effector","order":13,"path":"sprites/s_node_particle_effector/s_node_particle_effector.yy",},
|
||||
{"name":"s_node_particle","order":12,"path":"sprites/s_node_particle/s_node_particle.yy",},
|
||||
{"name":"s_node_path_3d","order":20,"path":"sprites/s_node_path_3d/s_node_path_3d.yy",},
|
||||
{"name":"s_node_path_anchor","order":1,"path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},
|
||||
{"name":"s_node_path_array","order":2,"path":"sprites/s_node_path_array/s_node_path_array.yy",},
|
||||
{"name":"s_node_path_bake","order":3,"path":"sprites/s_node_path_bake/s_node_path_bake.yy",},
|
||||
|
|
|
@ -2186,6 +2186,7 @@
|
|||
{"id":{"name":"s_node_3d_obj_combine","path":"sprites/s_node_3d_obj_combine/s_node_3d_obj_combine.yy",},},
|
||||
{"id":{"name":"s_node_3d_obj_export","path":"sprites/s_node_3d_obj_export/s_node_3d_obj_export.yy",},},
|
||||
{"id":{"name":"s_node_3d_obj","path":"sprites/s_node_3d_obj/s_node_3d_obj.yy",},},
|
||||
{"id":{"name":"s_node_3d_path_extrude","path":"sprites/s_node_3d_path_extrude/s_node_3d_path_extrude.yy",},},
|
||||
{"id":{"name":"s_node_3d_plane","path":"sprites/s_node_3d_plane/s_node_3d_plane.yy",},},
|
||||
{"id":{"name":"s_node_3d_point_affector","path":"sprites/s_node_3d_point_affector/s_node_3d_point_affector.yy",},},
|
||||
{"id":{"name":"s_node_3d_scene","path":"sprites/s_node_3d_scene/s_node_3d_scene.yy",},},
|
||||
|
@ -2464,6 +2465,7 @@
|
|||
{"id":{"name":"s_node_palette","path":"sprites/s_node_palette/s_node_palette.yy",},},
|
||||
{"id":{"name":"s_node_particle_effector","path":"sprites/s_node_particle_effector/s_node_particle_effector.yy",},},
|
||||
{"id":{"name":"s_node_particle","path":"sprites/s_node_particle/s_node_particle.yy",},},
|
||||
{"id":{"name":"s_node_path_3d","path":"sprites/s_node_path_3d/s_node_path_3d.yy",},},
|
||||
{"id":{"name":"s_node_path_anchor","path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},},
|
||||
{"id":{"name":"s_node_path_array","path":"sprites/s_node_path_array/s_node_path_array.yy",},},
|
||||
{"id":{"name":"s_node_path_bake","path":"sprites/s_node_path_bake/s_node_path_bake.yy",},},
|
||||
|
|
|
@ -55,6 +55,7 @@ enum ARRAY_OVERFLOW {
|
|||
pingpong
|
||||
}
|
||||
|
||||
#macro aGetF array_safe_get_fast
|
||||
function array_safe_get_fast(arr, index, def = 0) { #region
|
||||
INLINE
|
||||
|
||||
|
|
|
@ -76,8 +76,8 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_set_shader(_outSurf, max(_dim[0], _dim[1]) < 256? sh_bevel : sh_bevel_highp);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f_map("height", _hei, _data[11], inputs[| 1]);
|
||||
shader_set_f("shift", _shf);
|
||||
shader_set_f("scale", _sca);
|
||||
shader_set_2("shift", _shf);
|
||||
shader_set_2("scale", _sca);
|
||||
shader_set_i("slope", _slp);
|
||||
shader_set_i("sampleMode", _sam);
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("dimension", surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf));
|
||||
shader_set_f_map("strength", _data[1], _data[10], inputs[| 1]);
|
||||
shader_set_f("center", _cen);
|
||||
shader_set_2("center", _cen);
|
||||
shader_set_f("gamma", _data[11]);
|
||||
|
||||
draw_surface_safe(_data[0]);
|
||||
|
|
|
@ -72,7 +72,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
_cen[1] /= surface_get_height_safe(_outSurf);
|
||||
|
||||
surface_set_shader(_outSurf, sh_blur_zoom);
|
||||
shader_set_f("center", _cen);
|
||||
shader_set_2("center", _cen);
|
||||
shader_set_f_map("strength", _data[1], _data[12], inputs[| 1]);
|
||||
shader_set_i("blurMode", _data[4]);
|
||||
shader_set_i("sampleMode", _sam);
|
||||
|
|
|
@ -93,7 +93,7 @@ function Node_Cellular(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_set_shader(_outSurf, shader);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("seed", _tim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_f_map("scale", _data[2], _data[11], inputs[| 2]);
|
||||
shader_set_f("contrast", _con);
|
||||
shader_set_f("middle", _mid);
|
||||
|
|
|
@ -47,7 +47,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = noone) : Node_Processor(_x,
|
|||
surface_set_shader(_outSurf, sh_chromatic_aberration);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("dimension", surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
|
||||
shader_set_f("center", _data[1]);
|
||||
shader_set_2("center", _data[1]);
|
||||
shader_set_f_map("strength", _data[2], _data[4], inputs[| 2]);
|
||||
draw_surface_safe(_data[0]);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -76,7 +76,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
surface_set_shader(_outSurf, sh_dilate);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]);
|
||||
shader_set_f("center", _data[1]);
|
||||
shader_set_2("center", _data[1]);
|
||||
shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]);
|
||||
shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]);
|
||||
|
||||
|
|
|
@ -133,8 +133,8 @@ function Node_Grid(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
shader_set_f("truchetSeed", _data[18]);
|
||||
shader_set_f("truchetThresX", _data[19]);
|
||||
shader_set_f("truchetThresY", _data[22]);
|
||||
shader_set_f("truchetAngle", _data[23]);
|
||||
shader_set_f("level", _data[24]);
|
||||
shader_set_2("truchetAngle", _data[23]);
|
||||
shader_set_2("level", _data[24]);
|
||||
|
||||
shader_set_color("gapCol", _col_gap);
|
||||
|
||||
|
|
|
@ -128,8 +128,8 @@ function Node_Grid_Hex(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
shader_set_i("textureTruchet", _data[14]);
|
||||
shader_set_f("truchetSeed", _data[15]);
|
||||
shader_set_f("truchetThres", _data[16]);
|
||||
shader_set_f("truchetAngle", _data[19]);
|
||||
shader_set_f("level", _data[20]);
|
||||
shader_set_2("truchetAngle", _data[19]);
|
||||
shader_set_2("level", _data[20]);
|
||||
|
||||
shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]);
|
||||
|
||||
|
|
|
@ -65,18 +65,18 @@ function Node_Grid_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||
|
||||
surface_set_shader(_outSurf, sh_grid_noise);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_f("scale", _sca);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_2("scale", _sca);
|
||||
shader_set_i("useSampler", is_surface(_sam));
|
||||
shader_set_f("shift", _shf);
|
||||
shader_set_i("shiftAxis", _shfAx);
|
||||
shader_set_f("seed", _sed);
|
||||
shader_set_f("shift", _shf);
|
||||
shader_set_i("shiftAxis", _shfAx);
|
||||
shader_set_f("seed", _sed);
|
||||
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_f("colorRanR", _clr);
|
||||
shader_set_f("colorRanG", _clg);
|
||||
shader_set_f("colorRanB", _clb);
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_2("colorRanR", _clr);
|
||||
shader_set_2("colorRanG", _clg);
|
||||
shader_set_2("colorRanB", _clb);
|
||||
|
||||
if(is_surface(_sam))
|
||||
draw_surface_stretched_safe(_sam, 0, 0, _dim[0], _dim[1]);
|
||||
|
|
|
@ -107,7 +107,7 @@ function Node_Grid_Pentagonal(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
|||
shader_set_i("mode", _mode);
|
||||
shader_set_f("seed", _data[ 9]);
|
||||
shader_set_i("aa", _data[10]);
|
||||
shader_set_f("level", _data[16]);
|
||||
shader_set_2("level", _data[16]);
|
||||
|
||||
shader_set_color("gapCol", _col_gap);
|
||||
|
||||
|
|
|
@ -130,8 +130,8 @@ function Node_Grid_Tri(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
shader_set_i("textureTruchet", _data[14]);
|
||||
shader_set_f("truchetSeed", _data[15]);
|
||||
shader_set_f("truchetThres", _data[16]);
|
||||
shader_set_f("truchetAngle", _data[19]);
|
||||
shader_set_f("level", _data[20]);
|
||||
shader_set_2("truchetAngle", _data[19]);
|
||||
shader_set_2("level", _data[20]);
|
||||
|
||||
shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]);
|
||||
|
||||
|
|
|
@ -123,8 +123,8 @@ function Node_Herringbone_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y,
|
|||
shader_set_i("textureTruchet", _data[14]);
|
||||
shader_set_f("truchetSeed", _data[15]);
|
||||
shader_set_f("truchetThres", _data[16]);
|
||||
shader_set_f("truchetAngle", _data[20]);
|
||||
shader_set_f("level", _data[21]);
|
||||
shader_set_2("truchetAngle", _data[20]);
|
||||
shader_set_2("level", _data[21]);
|
||||
|
||||
shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]);
|
||||
|
||||
|
|
|
@ -125,17 +125,17 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
var _ao = _data[16];
|
||||
|
||||
surface_set_shader(_outSurf, sh_level);
|
||||
shader_set_f("lwi", _wi);
|
||||
shader_set_f("lri", _ri);
|
||||
shader_set_f("lgi", _gi);
|
||||
shader_set_f("lbi", _bi);
|
||||
shader_set_f("lai", _ai);
|
||||
shader_set_2("lwi", _wi);
|
||||
shader_set_2("lri", _ri);
|
||||
shader_set_2("lgi", _gi);
|
||||
shader_set_2("lbi", _bi);
|
||||
shader_set_2("lai", _ai);
|
||||
|
||||
shader_set_f("lwo", _wo);
|
||||
shader_set_f("lro", _ro);
|
||||
shader_set_f("lgo", _go);
|
||||
shader_set_f("lbo", _bo);
|
||||
shader_set_f("lao", _ao);
|
||||
shader_set_2("lwo", _wo);
|
||||
shader_set_2("lro", _ro);
|
||||
shader_set_2("lgo", _go);
|
||||
shader_set_2("lbo", _bo);
|
||||
shader_set_2("lao", _ao);
|
||||
|
||||
draw_surface_safe(_data[0]);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -398,9 +398,9 @@ function Node_Line(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
var tex = surface_get_texture(_tex);
|
||||
|
||||
shader_set(sh_draw_mapping);
|
||||
shader_set_f("position", _texPos);
|
||||
shader_set_2("position", _texPos);
|
||||
shader_set_f("rotation", degtorad(_texRot));
|
||||
shader_set_f("scale", _texSca);
|
||||
shader_set_2("scale", _texSca);
|
||||
|
||||
shader_set_interpolation(_tex);
|
||||
} #endregion
|
||||
|
|
|
@ -53,7 +53,7 @@ function Node_Mirror(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
|
||||
surface_set_shader(_outSurf, _output_index? sh_mirror_mask : sh_mirror);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_f("angle", degtorad(_ang));
|
||||
|
||||
draw_surface_safe(_suf);
|
||||
|
|
|
@ -33,10 +33,10 @@ function Node_Morph_Surface(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
surface_set_shader(_outSurf, sh_morph_surface);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_surface("sFrom", sFrom);
|
||||
shader_set_surface("sTo", sTo);
|
||||
shader_set_f("dimension", surface_get_width_safe(sFrom), surface_get_height_safe(sTo));
|
||||
shader_set_f("amount", amo);
|
||||
shader_set_f("threshold", thres);
|
||||
shader_set_surface("sTo", sTo);
|
||||
shader_set_f("dimension", surface_get_width_safe(sFrom), surface_get_height_safe(sTo));
|
||||
shader_set_f("amount", amo);
|
||||
shader_set_f("threshold", thres);
|
||||
|
||||
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, surface_get_width_safe(sFrom), surface_get_height_safe(sTo));
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -56,9 +56,9 @@ function Node_Noise(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
shader_set_f("seed", _sed);
|
||||
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_f("colorRanR", _clr);
|
||||
shader_set_f("colorRanG", _clg);
|
||||
shader_set_f("colorRanB", _clb);
|
||||
shader_set_2("colorRanR", _clr);
|
||||
shader_set_2("colorRanG", _clg);
|
||||
shader_set_2("colorRanB", _clb);
|
||||
|
||||
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -64,15 +64,15 @@ function Node_Noise_FBM(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1], attrDepth());
|
||||
|
||||
surface_set_shader(_outSurf, sh_noise_fbm);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_f("scale", _sca);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_2("scale", _sca);
|
||||
shader_set_f("seed", _sed);
|
||||
shader_set_i("iteration", _itr);
|
||||
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_f("colorRanR", _clr);
|
||||
shader_set_f("colorRanG", _clg);
|
||||
shader_set_f("colorRanB", _clb);
|
||||
shader_set_2("colorRanR", _clr);
|
||||
shader_set_2("colorRanG", _clg);
|
||||
shader_set_2("colorRanB", _clb);
|
||||
|
||||
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -77,15 +77,15 @@ function Node_Noise_Simplex(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
|
||||
surface_set_shader(_outSurf, sh_simplex);
|
||||
shader_set_f("dimension", _dim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_3("position", _pos);
|
||||
shader_set_f("rotation", degtorad(_ang));
|
||||
shader_set_f_map("scale", _data[2], _data[8], inputs[| 2]);
|
||||
shader_set_f_map("iteration", _data[3], _data[9], inputs[| 3]);
|
||||
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_f("colorRanR", _clr);
|
||||
shader_set_f("colorRanG", _clg);
|
||||
shader_set_f("colorRanB", _clb);
|
||||
shader_set_2("colorRanR", _clr);
|
||||
shader_set_2("colorRanG", _clg);
|
||||
shader_set_2("colorRanB", _clb);
|
||||
|
||||
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -42,7 +42,7 @@ function Node_PB_Fx_Brick(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c
|
|||
|
||||
surface_set_shader(_nbox.content, sh_pb_brick);
|
||||
shader_set_dim(, _pbox.content);
|
||||
shader_set_f("scale", _scal);
|
||||
shader_set_2("scale", _scal);
|
||||
shader_set_i("axis", _axis);
|
||||
shader_set_f("shift", _shft);
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ function Node_PB_Fx_Strip(_x, _y, _group = noone) : Node_PB_Fx(_x, _y, _group) c
|
|||
|
||||
surface_set_shader(_nbox.content, sh_pb_strip);
|
||||
shader_set_dim(, _pbox.content);
|
||||
shader_set_f("scale", _scal);
|
||||
shader_set_f("scale", _scal);
|
||||
shader_set_i("shift", _shft);
|
||||
shader_set_i("axis", _angl);
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
|
||||
surface_set_shader(_outSurf, sh_perlin_tiled);
|
||||
shader_set_f("u_resolution", _dim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_f("rotation", degtorad(_rot));
|
||||
shader_set_f_map("scale", _data[2], _data[10], inputs[| 2]);
|
||||
shader_set_f("seed", _sed);
|
||||
|
@ -93,9 +93,9 @@ function Node_Perlin(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
shader_set_i("iteration", _ite);
|
||||
|
||||
shader_set_i("colored", _col);
|
||||
shader_set_f("colorRanR", _clr);
|
||||
shader_set_f("colorRanG", _clg);
|
||||
shader_set_f("colorRanB", _clb);
|
||||
shader_set_2("colorRanR", _clr);
|
||||
shader_set_2("colorRanG", _clg);
|
||||
shader_set_2("colorRanB", _clb);
|
||||
|
||||
draw_sprite_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], 0, c_white, 1);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -44,8 +44,8 @@ function Node_Perlin_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
|
||||
surface_set_shader(_outSurf, sh_perlin_smear);
|
||||
shader_set_f("u_resolution", _dim);
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_f("scale", _sca);
|
||||
shader_set_2("position", _pos);
|
||||
shader_set_2("scale", _sca);
|
||||
shader_set_f("bright", _bri);
|
||||
shader_set_i("iteration", _ite);
|
||||
shader_set_f("rotation", degtorad(_rot));
|
||||
|
|
|
@ -62,7 +62,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
shader_set_i("distMode", _data[9]);
|
||||
shader_set_f_map("blend", _data[6], _data[11], inputs[| 6]);
|
||||
shader_set_i("swap", _data[10]);
|
||||
shader_set_f("tile", _data[12]);
|
||||
shader_set_2("tile", _data[12]);
|
||||
|
||||
draw_surface_safe(_data[0], 0, 0);
|
||||
surface_reset_shader();
|
||||
|
|
|
@ -125,8 +125,8 @@ function Node_Pytagorean_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _
|
|||
shader_set_i("textureTruchet", _data[14]);
|
||||
shader_set_f("truchetSeed", _data[15]);
|
||||
shader_set_f("truchetThres", _data[16]);
|
||||
shader_set_f("truchetAngle", _data[20]);
|
||||
shader_set_f("level", _data[21]);
|
||||
shader_set_2("truchetAngle", _data[20]);
|
||||
shader_set_2("level", _data[21]);
|
||||
|
||||
shader_set_gradient(_data[5], _data[18], _data[19], inputs[| 5]);
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ function Node_Quasicrystal(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
surface_set_shader(_outSurf, sh_quarsicrystal);
|
||||
shader_set_f("dimension", _dim[0], _dim[1]);
|
||||
shader_set_f("position", _pos[0] / _dim[0], _pos[1] / _dim[1]);
|
||||
shader_set_f("rangleRange", _aran);
|
||||
shader_set_2("rangleRange", _aran);
|
||||
|
||||
shader_set_f_map("amount", _data[1], _data[6], inputs[| 1]);
|
||||
shader_set_f_map("angle", _data[2], _data[7], inputs[| 2]);
|
||||
|
|
|
@ -120,8 +120,8 @@ function Node_Random_Tile(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
shader_set_i("textureTruchet", _data[14]);
|
||||
shader_set_f("truchetSeed", _data[15]);
|
||||
shader_set_f("truchetThres", _data[16]);
|
||||
shader_set_f("truchetAngle", _data[19]);
|
||||
shader_set_f("level", _data[20]);
|
||||
shader_set_2("truchetAngle", _data[19]);
|
||||
shader_set_2("level", _data[20]);
|
||||
|
||||
shader_set_gradient(_data[5], _data[17], _data[18], inputs[| 5]);
|
||||
|
||||
|
|
|
@ -105,16 +105,16 @@ function Node_RM_Terrain(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
shader_set_i("shape", 1);
|
||||
shader_set_i("tile", _tile);
|
||||
shader_set_i("useTexture", is_surface(_text));
|
||||
shader_set_f("position", _pos);
|
||||
shader_set_f("rotation", _rot);
|
||||
shader_set_3("position", _pos);
|
||||
shader_set_3("rotation", _rot);
|
||||
shader_set_f("objectScale", _sca);
|
||||
shader_set_f("thickness", _thk);
|
||||
|
||||
shader_set_f("fov", _fov);
|
||||
shader_set_f("viewRange", _rng);
|
||||
shader_set_2("viewRange", _rng);
|
||||
shader_set_f("depthInt", _dpi);
|
||||
|
||||
shader_set_f("sunPosition", _sun);
|
||||
shader_set_3("sunPosition", _sun);
|
||||
shader_set_f("shadow", _sha);
|
||||
|
||||
shader_set_color("background", _bgc);
|
||||
|
|
|
@ -118,10 +118,10 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 8].setVisible(_type == 0);
|
||||
|
||||
if(!is_surface(_bg)) return _outSurf;
|
||||
|
||||
|
||||
surface_set_shader(_outSurf, sh_shadow_cast);
|
||||
shader_set_f("dimension", surface_get_width_safe(_bg), surface_get_height_safe(_bg));
|
||||
shader_set_f("lightPos", _pos);
|
||||
shader_set_2("lightPos", _pos);
|
||||
shader_set_color("lightAmb", _lamb);
|
||||
shader_set_color("lightClr", _lclr);
|
||||
shader_set_f("lightRadius", _rad);
|
||||
|
|
|
@ -331,7 +331,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 21].setVisible( true);
|
||||
|
||||
shader_set_i("shape", 11);
|
||||
shader_set_f("trep", _data[21]);
|
||||
shader_set_2("trep", _data[21]);
|
||||
break;
|
||||
|
||||
case "Parallelogram" :
|
||||
|
@ -475,7 +475,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 24].setVisible(true);
|
||||
|
||||
shader_set_i("shape", 17);
|
||||
shader_set_f("arrow", _data[23]);
|
||||
shader_set_2("arrow", _data[23]);
|
||||
shader_set_f("arrow_head", _data[24]);
|
||||
break;
|
||||
|
||||
|
@ -491,7 +491,7 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
shader_set_f("inner", _data[13]);
|
||||
|
||||
shader_set_i("teeth", _data[25]);
|
||||
shader_set_f("teethSize", _data[26]);
|
||||
shader_set_2("teethSize", _data[26]);
|
||||
shader_set_f("teethAngle", _data[27]);
|
||||
break;
|
||||
|
||||
|
@ -501,12 +501,12 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
shader_set_f("bgColor", _bgcol);
|
||||
shader_set_i("aa", _aa);
|
||||
shader_set_i("drawDF", _df);
|
||||
shader_set_f("dfLevel", _level);
|
||||
shader_set_2("dfLevel", _level);
|
||||
shader_set_i("tile", _tile);
|
||||
shader_set_f("corner", _corner);
|
||||
|
||||
shader_set_f("center", _center);
|
||||
shader_set_f("scale", _scale );
|
||||
shader_set_2("center", _center);
|
||||
shader_set_2("scale", _scale );
|
||||
shader_set_f("rotation", degtorad(_rotat));
|
||||
|
||||
draw_sprite_stretched_ext(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1], _color, _color_get_alpha(_color));
|
||||
|
|
|
@ -54,7 +54,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
if(_shape == 0) {
|
||||
surface_set_shader(_outSurf, sh_shape_map_circle);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("scale", _scale);
|
||||
shader_set_2("scale", _scale);
|
||||
shader_set_f("txScale", _sca);
|
||||
shader_set_f("angle", _rot);
|
||||
|
||||
|
@ -65,7 +65,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_set_shader(_outSurf, sh_shape_map_polygon);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("sides", _sides);
|
||||
shader_set_f("scale", _scale);
|
||||
shader_set_2("scale", _scale);
|
||||
shader_set_f("txScale", _sca);
|
||||
shader_set_f("angle", _rot);
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
surface_set_shader(_outSurf, sh_skew);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_dim("dimension", _data[0]);
|
||||
shader_set_f("center", _data[4]);
|
||||
shader_set_2("center", _data[4]);
|
||||
shader_set_i("axis", _data[1]);
|
||||
shader_set_f_map("amount", _data[2], _data[12], inputs[| 2]);
|
||||
shader_set_i("sampleMode", _samp);
|
||||
|
|
|
@ -51,8 +51,8 @@ function Node_Smoke_Turbulence(_x, _y, _group = noone) : Node_Smoke(_x, _y, _gro
|
|||
shader_set(sh_fd_turbulence);
|
||||
BLEND_OVERRIDE;
|
||||
|
||||
shader_set_uniform_f(shader_get_uniform(sh_fd_turbulence, "scale"), _sca);
|
||||
shader_set_uniform_f(shader_get_uniform(sh_fd_turbulence, "seed"), _sed);
|
||||
shader_set_uniform_f(shader_get_uniform(sh_fd_turbulence, "scale"), _sca);
|
||||
shader_set_uniform_f(shader_get_uniform(sh_fd_turbulence, "seed"), _sed);
|
||||
shader_set_uniform_f(shader_get_uniform(sh_fd_turbulence, "strength"), _str);
|
||||
draw_sprite_stretched(s_fx_pixel, 0, _are[0] - _are[2], _are[1] - _are[3], _are[2] * 2, _are[3] * 2);
|
||||
BLEND_NORMAL;
|
||||
|
|
|
@ -81,7 +81,7 @@ function Node_Spherize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_set_shader(_outSurf, sh_spherize);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("dimension", [ surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]) ]);
|
||||
shader_set_f("center", _data[1]);
|
||||
shader_set_2("center", _data[1]);
|
||||
shader_set_f("trim", _data[13]);
|
||||
shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]);
|
||||
shader_set_f_map("radius", _data[3], _data[12], inputs[| 3]);
|
||||
|
|
|
@ -239,10 +239,10 @@ function Node_Sprite_Stack(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
for( var i = 0; i < _amo; i++ ) {
|
||||
if(_hig && i == _amo - 1) {
|
||||
shader_set(sh_replace_color);
|
||||
shader_set_i("type", _hig);
|
||||
shader_set_i("type", _hig);
|
||||
shader_set_f("dimension", _ww, _hh);
|
||||
shader_set_f("shift", _shf[0] / _ww, _shf[1] / _hh);
|
||||
shader_set_f("angle", degtorad(_rot));
|
||||
shader_set_f("shift", _shf[0] / _ww, _shf[1] / _hh);
|
||||
shader_set_f("angle", degtorad(_rot));
|
||||
draw_surface_ext_safe(_in, _po[0] + _pos[0], _po[1] + _pos[1], 1, 1, _rot, _hiC, _color_get_alpha(_hiC));
|
||||
shader_reset();
|
||||
} else
|
||||
|
|
|
@ -75,7 +75,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_set_shader(_outSurf, sh_twirl);
|
||||
shader_set_interpolation(_data[0]);
|
||||
shader_set_f("dimension" , surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
|
||||
shader_set_f("center" , _data[1]);
|
||||
shader_set_2("center" , _data[1]);
|
||||
shader_set_f_map("strength", _data[2], _data[11], inputs[| 2]);
|
||||
shader_set_f_map("radius" , _data[3], _data[12], inputs[| 3]);
|
||||
shader_set_i("sampleMode", sam);
|
||||
|
|
|
@ -27,6 +27,10 @@ function shader_set_i_array(shader, uniform, array) { #region
|
|||
shader_set_uniform_i_array(shader_get_uniform(shader, uniform), array);
|
||||
} #endregion
|
||||
|
||||
function shader_set_2(uniform, v) { INLINE var shader = shader_current(); shader_set_uniform_f(shader_get_uniform(shader, uniform), aGetF(v, 0), aGetF(v, 1)); }
|
||||
function shader_set_3(uniform, v) { INLINE var shader = shader_current(); shader_set_uniform_f(shader_get_uniform(shader, uniform), aGetF(v, 0), aGetF(v, 1), aGetF(v, 2)); }
|
||||
function shader_set_4(uniform, v) { INLINE var shader = shader_current(); shader_set_uniform_f(shader_get_uniform(shader, uniform), aGetF(v, 0), aGetF(v, 1), aGetF(v, 2), aGetF(v, 3)); }
|
||||
|
||||
function shader_set_f(uniform, value) { #region
|
||||
INLINE
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
90
sprites/s_node_3d_path_extrude/s_node_3d_path_extrude.yy
Normal file
90
sprites/s_node_3d_path_extrude/s_node_3d_path_extrude.yy
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"$GMSprite":"",
|
||||
"%Name":"s_node_3d_path_extrude",
|
||||
"bboxMode":0,
|
||||
"bbox_bottom":58,
|
||||
"bbox_left":5,
|
||||
"bbox_right":55,
|
||||
"bbox_top":5,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"dc246176-904a-4f21-a1bb-78132de29a3d","name":"dc246176-904a-4f21-a1bb-78132de29a3d","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":64,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"db6207be-0d2a-45c3-8e52-4b6eb0f051b6","blendMode":0,"displayName":"default","isLocked":false,"name":"db6207be-0d2a-45c3-8e52-4b6eb0f051b6","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_node_3d_path_extrude",
|
||||
"nineSlice":null,
|
||||
"origin":4,
|
||||
"parent":{
|
||||
"name":"3D",
|
||||
"path":"folders/nodes/icons/3D.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
"resourceVersion":"2.0",
|
||||
"sequence":{
|
||||
"$GMSequence":"",
|
||||
"%Name":"s_node_3d_path_extrude",
|
||||
"autoRecord":true,
|
||||
"backdropHeight":768,
|
||||
"backdropImageOpacity":0.5,
|
||||
"backdropImagePath":"",
|
||||
"backdropWidth":1366,
|
||||
"backdropXOffset":0.0,
|
||||
"backdropYOffset":0.0,
|
||||
"events":{
|
||||
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":1.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"name":"s_node_3d_path_extrude",
|
||||
"playback":1,
|
||||
"playbackSpeed":30.0,
|
||||
"playbackSpeedType":0,
|
||||
"resourceType":"GMSequence",
|
||||
"resourceVersion":"2.0",
|
||||
"showBackdrop":true,
|
||||
"showBackdropImage":false,
|
||||
"timeUnits":1,
|
||||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"dc246176-904a-4f21-a1bb-78132de29a3d","path":"sprites/s_node_3d_path_extrude/s_node_3d_path_extrude.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"cdb305ec-00da-4dea-b754-fde82398f4dd","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
"volume":1.0,
|
||||
"xorigin":32,
|
||||
"yorigin":32,
|
||||
},
|
||||
"swatchColours":null,
|
||||
"swfPrecision":0.5,
|
||||
"textureGroupId":{
|
||||
"name":"Default",
|
||||
"path":"texturegroups/Default",
|
||||
},
|
||||
"type":0,
|
||||
"VTile":false,
|
||||
"width":64,
|
||||
}
|
BIN
sprites/s_node_path_3d/6dd76180-ba3e-44f2-9f24-8ea67eae966c.png
Normal file
BIN
sprites/s_node_path_3d/6dd76180-ba3e-44f2-9f24-8ea67eae966c.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
90
sprites/s_node_path_3d/s_node_path_3d.yy
Normal file
90
sprites/s_node_path_3d/s_node_path_3d.yy
Normal file
|
@ -0,0 +1,90 @@
|
|||
{
|
||||
"$GMSprite":"",
|
||||
"%Name":"s_node_path_3d",
|
||||
"bboxMode":0,
|
||||
"bbox_bottom":61,
|
||||
"bbox_left":7,
|
||||
"bbox_right":62,
|
||||
"bbox_top":4,
|
||||
"collisionKind":1,
|
||||
"collisionTolerance":0,
|
||||
"DynamicTexturePage":false,
|
||||
"edgeFiltering":false,
|
||||
"For3D":false,
|
||||
"frames":[
|
||||
{"$GMSpriteFrame":"","%Name":"6dd76180-ba3e-44f2-9f24-8ea67eae966c","name":"6dd76180-ba3e-44f2-9f24-8ea67eae966c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||
],
|
||||
"gridX":0,
|
||||
"gridY":0,
|
||||
"height":64,
|
||||
"HTile":false,
|
||||
"layers":[
|
||||
{"$GMImageLayer":"","%Name":"ed6e88d7-0348-4baa-9c2f-9a0fec3b2f59","blendMode":0,"displayName":"default","isLocked":false,"name":"ed6e88d7-0348-4baa-9c2f-9a0fec3b2f59","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||
],
|
||||
"name":"s_node_path_3d",
|
||||
"nineSlice":null,
|
||||
"origin":4,
|
||||
"parent":{
|
||||
"name":"path",
|
||||
"path":"folders/nodes/icons/value/path.yy",
|
||||
},
|
||||
"preMultiplyAlpha":false,
|
||||
"resourceType":"GMSprite",
|
||||
"resourceVersion":"2.0",
|
||||
"sequence":{
|
||||
"$GMSequence":"",
|
||||
"%Name":"s_node_path_3d",
|
||||
"autoRecord":true,
|
||||
"backdropHeight":768,
|
||||
"backdropImageOpacity":0.5,
|
||||
"backdropImagePath":"",
|
||||
"backdropWidth":1366,
|
||||
"backdropXOffset":0.0,
|
||||
"backdropYOffset":0.0,
|
||||
"events":{
|
||||
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"eventStubScript":null,
|
||||
"eventToFunction":{},
|
||||
"length":1.0,
|
||||
"lockOrigin":false,
|
||||
"moments":{
|
||||
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||
"Keyframes":[],
|
||||
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||
"resourceVersion":"2.0",
|
||||
},
|
||||
"name":"s_node_path_3d",
|
||||
"playback":1,
|
||||
"playbackSpeed":30.0,
|
||||
"playbackSpeedType":0,
|
||||
"resourceType":"GMSequence",
|
||||
"resourceVersion":"2.0",
|
||||
"showBackdrop":true,
|
||||
"showBackdropImage":false,
|
||||
"timeUnits":1,
|
||||
"tracks":[
|
||||
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"6dd76180-ba3e-44f2-9f24-8ea67eae966c","path":"sprites/s_node_path_3d/s_node_path_3d.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||
},"Disabled":false,"id":"408a6210-5430-4d3d-bf99-eee1e309f6b5","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||
],
|
||||
"visibleRange":null,
|
||||
"volume":1.0,
|
||||
"xorigin":32,
|
||||
"yorigin":32,
|
||||
},
|
||||
"swatchColours":null,
|
||||
"swfPrecision":0.5,
|
||||
"textureGroupId":{
|
||||
"name":"Default",
|
||||
"path":"texturegroups/Default",
|
||||
},
|
||||
"type":0,
|
||||
"VTile":false,
|
||||
"width":64,
|
||||
}
|
Loading…
Reference in a new issue