flow noise, hsv

This commit is contained in:
Tanasart 2024-03-17 20:24:24 +07:00
parent 452e55c908
commit 8c7fa1712f
29 changed files with 274 additions and 57 deletions

View file

@ -756,6 +756,7 @@
{"name":"sh_fd_advect_material_a_16_glsl","order":2,"path":"shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.yy",},
{"name":"distribution_function","order":12,"path":"scripts/distribution_function/distribution_function.yy",},
{"name":"TabletStuff","order":16,"path":"extensions/TabletStuff/TabletStuff.yy",},
{"name":"sh_noise_flow","order":17,"path":"shaders/sh_noise_flow/sh_noise_flow.yy",},
{"name":"sh_blur_radial","order":9,"path":"shaders/sh_blur_radial/sh_blur_radial.yy",},
{"name":"node_iterator_each_input","order":1,"path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},
{"name":"json_minify","order":6,"path":"scripts/json_minify/json_minify.yy",},
@ -1371,6 +1372,7 @@
{"name":"sh_erode","order":8,"path":"shaders/sh_erode/sh_erode.yy",},
{"name":"fd_rectangle_get_velocity_dissipation_value","order":21,"path":"scripts/fd_rectangle_get_velocity_dissipation_value/fd_rectangle_get_velocity_dissipation_value.yy",},
{"name":"node_pixel_cloud","order":20,"path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},
{"name":"s_node_flow_noise","order":48,"path":"sprites/s_node_flow_noise/s_node_flow_noise.yy",},
{"name":"s_node_crop_content","order":13,"path":"sprites/s_node_crop_content/s_node_crop_content.yy",},
{"name":"draw_line_zigzag","order":14,"path":"scripts/draw_line_zigzag/draw_line_zigzag.yy",},
{"name":"sh_alpha_grey","order":1,"path":"shaders/sh_alpha_grey/sh_alpha_grey.yy",},
@ -1915,6 +1917,7 @@
{"name":"s_node_fluidSim_force","order":13,"path":"sprites/s_node_fluidSim_force/s_node_fluidSim_force.yy",},
{"name":"node_repeat","order":8,"path":"scripts/node_repeat/node_repeat.yy",},
{"name":"draw_arc","order":16,"path":"scripts/draw_arc/draw_arc.yy",},
{"name":"node_flow_noise","order":18,"path":"scripts/node_flow_noise/node_flow_noise.yy",},
{"name":"sh_fd_advect_velocity_1_glsl","order":7,"path":"shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.yy",},
{"name":"mac_window_step","order":1,"path":"scripts/mac_window_step/mac_window_step.yy",},
{"name":"node_midi_in","order":20,"path":"scripts/node_midi_in/node_midi_in.yy",},

View file

@ -1007,6 +1007,7 @@
{"id":{"name":"sh_fd_advect_material_a_16_glsl","path":"shaders/sh_fd_advect_material_a_16_glsl/sh_fd_advect_material_a_16_glsl.yy",},},
{"id":{"name":"distribution_function","path":"scripts/distribution_function/distribution_function.yy",},},
{"id":{"name":"TabletStuff","path":"extensions/TabletStuff/TabletStuff.yy",},},
{"id":{"name":"sh_noise_flow","path":"shaders/sh_noise_flow/sh_noise_flow.yy",},},
{"id":{"name":"sh_blur_radial","path":"shaders/sh_blur_radial/sh_blur_radial.yy",},},
{"id":{"name":"node_blur","path":"scripts/node_blur/node_blur.yy",},},
{"id":{"name":"node_iterator_each_input","path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},},
@ -1705,6 +1706,7 @@
{"id":{"name":"mac_window_init","path":"scripts/mac_window_init/mac_window_init.yy",},},
{"id":{"name":"fd_rectangle_get_velocity_dissipation_value","path":"scripts/fd_rectangle_get_velocity_dissipation_value/fd_rectangle_get_velocity_dissipation_value.yy",},},
{"id":{"name":"node_pixel_cloud","path":"scripts/node_pixel_cloud/node_pixel_cloud.yy",},},
{"id":{"name":"s_node_flow_noise","path":"sprites/s_node_flow_noise/s_node_flow_noise.yy",},},
{"id":{"name":"s_node_crop_content","path":"sprites/s_node_crop_content/s_node_crop_content.yy",},},
{"id":{"name":"draw_line_zigzag","path":"scripts/draw_line_zigzag/draw_line_zigzag.yy",},},
{"id":{"name":"sh_alpha_grey","path":"shaders/sh_alpha_grey/sh_alpha_grey.yy",},},
@ -2336,6 +2338,7 @@
{"id":{"name":"s_node_fluidSim_force","path":"sprites/s_node_fluidSim_force/s_node_fluidSim_force.yy",},},
{"id":{"name":"node_repeat","path":"scripts/node_repeat/node_repeat.yy",},},
{"id":{"name":"draw_arc","path":"scripts/draw_arc/draw_arc.yy",},},
{"id":{"name":"node_flow_noise","path":"scripts/node_flow_noise/node_flow_noise.yy",},},
{"id":{"name":"sh_fd_advect_velocity_1_glsl","path":"shaders/sh_fd_advect_velocity_1_glsl/sh_fd_advect_velocity_1_glsl.yy",},},
{"id":{"name":"mac_window_step","path":"scripts/mac_window_step/mac_window_step.yy",},},
{"id":{"name":"node_midi_in","path":"scripts/node_midi_in/node_midi_in.yy",},},

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

@ -1,38 +1,56 @@
function Node_Combine_HSV(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "HSV Combine";
shader = sh_combine_hsv;
uniform_h = shader_get_sampler_index(shader, "samH");
uniform_s = shader_get_sampler_index(shader, "samS");
uniform_v = shader_get_sampler_index(shader, "samV");
inputs[| 0] = nodeValue("Hue", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 1] = nodeValue("Saturation", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 2] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 3] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 4] = nodeValue("Array Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
inputs[| 5] = nodeValue("HSV Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [])
.setArrayDepth(1);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [
["Surfaces", true], 4, 0, 1, 2, 3, 5,
]
attribute_surface_depth();
static step = function() { #region
var _arr = getInputData(4);
inputs[| 0].setVisible(!_arr, !_arr);
inputs[| 1].setVisible(!_arr, !_arr);
inputs[| 2].setVisible(!_arr, !_arr);
inputs[| 3].setVisible(!_arr, !_arr);
inputs[| 5].setVisible(_arr, _arr);
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _h = _data[0];
var _s = _data[1];
var _v = _data[2];
var _arr = _data[4];
surface_set_target(_outSurf);
DRAW_CLEAR
BLEND_OVERRIDE;
var _h = _arr? array_safe_get(_data[5], 0) : _data[0];
var _s = _arr? array_safe_get(_data[5], 1) : _data[1];
var _v = _arr? array_safe_get(_data[5], 2) : _data[2];
var _a = _arr? array_safe_get(_data[5], 3) : _data[3];
shader_set(shader);
texture_set_stage(uniform_h, surface_get_texture(_h));
texture_set_stage(uniform_s, surface_get_texture(_s));
texture_set_stage(uniform_v, surface_get_texture(_v));
surface_set_shader(_outSurf, sh_combine_hsv);
shader_set_surface("samH", _h);
shader_set_surface("samS", _s);
shader_set_surface("samV", _v);
shader_set_surface("samA", _a);
draw_sprite_ext(s_fx_pixel, 0, 0, 0, surface_get_width_safe(_outSurf), surface_get_width_safe(_outSurf), 0, c_white, 1);
shader_reset();
BLEND_NORMAL;
surface_reset_target();
shader_set_i("useH", is_surface(_h));
shader_set_i("useS", is_surface(_s));
shader_set_i("useV", is_surface(_v));
shader_set_i("useA", is_surface(_a));
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, surface_get_width_safe(_outSurf), surface_get_width_safe(_outSurf));
surface_reset_shader();
return _outSurf;
} #endregion

View file

@ -20,24 +20,40 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
//////////////////////////////////////////////////////////////////////////////////////////////////
inputs[| 7] = nodeValue("Array Input", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
inputs[| 8] = nodeValue("RGBA Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, [])
.setArrayDepth(1);
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_display_list = [
["Sampling", false], 4, 5, 6,
["Surfaces", true], 0, 1, 2, 3,
["Surfaces", true], 7, 0, 1, 2, 3, 8,
]
attribute_surface_depth();
static step = function() { #region
inputs[| 5].mappableStep();
var _arr = getInputData(7);
inputs[| 0].setVisible(!_arr, !_arr);
inputs[| 1].setVisible(!_arr, !_arr);
inputs[| 2].setVisible(!_arr, !_arr);
inputs[| 3].setVisible(!_arr, !_arr);
inputs[| 8].setVisible(_arr, _arr);
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var _r = _data[0];
var _g = _data[1];
var _b = _data[2];
var _a = _data[3];
var _arr = _data[7];
var _r = _arr? array_safe_get(_data[8], 0) : _data[0];
var _g = _arr? array_safe_get(_data[8], 1) : _data[1];
var _b = _arr? array_safe_get(_data[8], 2) : _data[2];
var _a = _arr? array_safe_get(_data[8], 3) : _data[3];
var _baseS = _r;
if(!is_surface(_baseS)) _baseS = _g;
@ -47,11 +63,12 @@ function Node_Combine_RGB(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
_outSurf = surface_verify(_outSurf, surface_get_width_safe(_baseS), surface_get_height_safe(_baseS));
surface_set_shader(_outSurf, sh_combine_rgb);
shader_set_surface("samplerR", _r);
shader_set_surface("samplerG", _g);
shader_set_surface("samplerB", _b);
shader_set_surface("samplerA", _a);
shader_set_i("useR", is_surface(_r));
shader_set_i("useG", is_surface(_g));
shader_set_i("useB", is_surface(_b));

View file

@ -0,0 +1,25 @@
function Node_Flow_Noise(_x, _y, _group = noone) : Node_Shader_Generator(_x, _y, _group) constructor {
name = "Flow Noise";
shader = sh_noise_flow;
inputs[| 1] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(index); });
addShaderProp(SHADER_UNIFORM.float, "position");
inputs[| 2] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 2, 2 ])
.setDisplay(VALUE_DISPLAY.vector);
addShaderProp(SHADER_UNIFORM.float, "scale");
inputs[| 3] = nodeValue("Progress", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
addShaderProp(SHADER_UNIFORM.float, "progress");
inputs[| 4] = nodeValue("Detail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 1, 8 ])
.setDisplay(VALUE_DISPLAY.slider_range, { range: [ 1, 16, 1 ] });
addShaderProp(SHADER_UNIFORM.float, "detail");
input_display_list = [
["Output", true], 0,
["Noise", false], 1, 2, 3, 4,
];
}

View file

@ -0,0 +1,11 @@
{
"resourceType": "GMScript",
"resourceVersion": "1.0",
"name": "node_flow_noise",
"isCompatibility": false,
"isDnD": false,
"parent": {
"name": "noise",
"path": "folders/nodes/data/generator/noise.yy",
},
}

View file

@ -0,0 +1,12 @@
{
"isDnD": false,
"isCompatibility": false,
"parent": {
"name": "generator",
"path": "folders/nodes/data/generator.yy",
},
"resourceVersion": "1.0",
"name": "node_gradient",
"tags": [],
"resourceType": "GMScript",
}

View file

@ -13,8 +13,8 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]);
inputs[| 4] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Square", s_node_shape, 0),
new scrollItem("Circle", s_node_shape, 1),
.setDisplay(VALUE_DISPLAY.enum_scroll, [ new scrollItem("Square", s_node_shape_type, 0),
new scrollItem("Circle", s_node_shape_type, 1),
new scrollItem("Diamond", s_node_shape_misc, 0) ]);
inputs[| 5] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
@ -51,13 +51,14 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
var _sam = struct_try_get(attributes, "oversample");
surface_set_shader(_outSurf, sh_local_analyze);
shader_set_f("dimension" , surface_get_width_safe(_data[0]), surface_get_height_safe(_data[0]));
shader_set_f("dimension" , surface_get_dimension(_data[0]));
shader_set_i("algorithm" , _alg);
shader_set_f("size" , _siz);
shader_set_i("shape" , _shp);
shader_set_i("sampleMode", _sam);
draw_surface_safe(_data[0], 0, 0);
surface_reset_target();
draw_surface_safe(_data[0]);
surface_reset_shader();
__process_mask_modifier(_data);
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);

View file

@ -5,7 +5,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random())
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, seed_random());
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
.setDisplay(VALUE_DISPLAY.slider);
@ -41,8 +41,7 @@ function Node_MK_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
]
temp_surface = [ surface_create( 1, 1 ), surface_create( 1, 1 ), surface_create( 1, 1 ) ];
light_only = [];
light_only = [];
surface_blur_init();

View file

@ -695,6 +695,7 @@ function __initNodes() {
addNodeObject(generator, "Fold Noise", s_node_fold_noise, "Node_Fold_Noise", [1, Node_Fold_Noise]).setVersion(11650);
addNodeObject(generator, "Strand Noise", s_node_strand_noise, "Node_Noise_Strand", [1, Node_Noise_Strand]).setVersion(11650);
addNodeObject(generator, "Bubble Noise", s_node_bubble_noise, "Node_Noise_Bubble", [1, Node_Noise_Bubble]).patreonExtra();
addNodeObject(generator, "Flow Noise", s_node_flow_noise, "Node_Flow_Noise", [1, Node_Flow_Noise]).patreonExtra();
ds_list_add(generator, "Patterns");
addNodeObject(generator, "Stripe", s_node_stripe, "Node_Stripe", [1, Node_Stripe],, "Generate stripe pattern.");

View file

@ -70,8 +70,9 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
input_display_list = [ 17,
["Surfaces", true], 0, 1,
["Light", false], 5, 12, 8, 2, 3, 4,
["BG Shadow Caster", true, 10], 11,
["Light", false], 5, 12, 8, 2,
["Soft Light", false], 4, 3,
["Render", false], 13, 14, 7, 6, 9,
["Ambient Occlusion", false], 15, 16,
];
@ -113,7 +114,6 @@ function Node_Shadow_Cast(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
var _bg_thr = _data[11];
inputs[| 8].setVisible(_type == 0);
inputs[| 11].setVisible(_bg_use);
if(!is_surface(_bg)) return _outSurf;

View file

@ -27,7 +27,7 @@ function Node_Shape_Map(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
input_display_list = [ 1,
["Surfaces", true], 0,
["Shape", false], 2, 4, 5, 6, 7,
["Shape", false], 2, 5, 6, 7,
["Mapping", false], 3,
];

View file

@ -35,7 +35,7 @@ function Node_Smear(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
inputs[| 11] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_button, [ "Greyscale", "Alpha" ]);
inputs[| 12] = nodeValue("Modulate strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false)
inputs[| 12] = nodeValue("Modulate strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
inputs[| 13] = nodeValue("Spread", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.slider, { range : [ 0, 30, 1 ] });

View file

@ -13,9 +13,9 @@ function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _
inputs[| 3] = nodeValue("Color Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How similiar the color need to be in order to be count as matched." )
.setDisplay(VALUE_DISPLAY.slider);
inputs[| 4] = nodeValue("Draw Base Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true )
inputs[| 4] = nodeValue("Draw Base Image", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true );
inputs[| 5] = nodeValue("Fast Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true )
inputs[| 5] = nodeValue("Fast Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true );
inputs[| 6] = nodeValue("Pixel Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1, "How many pixel need to me matched to replace with replacement image." )
.setDisplay(VALUE_DISPLAY.slider);

View file

@ -1,10 +1,15 @@
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform sampler2D samH, samS, samV;
uniform sampler2D samH;
uniform sampler2D samS;
uniform sampler2D samV;
uniform sampler2D samA;
uniform int useR;
uniform int useG;
uniform int useB;
uniform int useA;
vec3 hsv2rgb(vec3 c) {
vec4 K = vec4(1.0, 2.0 / 3.0, 1.0 / 3.0, 3.0);
@ -12,14 +17,13 @@ vec3 hsv2rgb(vec3 c) {
return c.z * mix(K.xxx, clamp(p - K.xxx, 0.0, 1.0), c.y);
}
float sample(vec4 col, int ch) { return (col[0] + col[1] + col[2]) / 3. * col[3]; }
void main() {
vec4 _h = texture2D( samH, v_vTexcoord );
vec4 _s = texture2D( samS, v_vTexcoord );
vec4 _v = texture2D( samV, v_vTexcoord );
float h = (useH == 1)? sample(texture2D( samH, v_vTexcoord ), 0) : 0.;
float s = (useS == 1)? sample(texture2D( samS, v_vTexcoord ), 1) : 0.;
float v = (useV == 1)? sample(texture2D( samV, v_vTexcoord ), 2) : 0.;
float a = (useA == 1)? sample(texture2D( samA, v_vTexcoord ), 3) : 1.;
float h = (_h[0] + _h[1] + _h[2]) / 3.;
float s = (_s[0] + _s[1] + _s[2]) / 3.;
float v = (_v[0] + _v[1] + _v[2]) / 3.;
gl_FragColor = vec4(hsv2rgb(vec3(h, s, v)), 1.);
gl_FragColor = vec4(hsv2rgb(vec3(h, s, v)), a);
}

View file

@ -1,6 +1,3 @@
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;

View file

@ -320,5 +320,5 @@ void main() {
gl_FragData[0] = final_color;
gl_FragData[1] = vec4(0.5 + normal * 0.5, final_color.a);
gl_FragData[2] = vec4(vec3(v_cameraDistance), final_color.a);
gl_FragData[2] = vec4(vec3(1. - abs(v_cameraDistance)), final_color.a);
}

View file

@ -26,6 +26,7 @@ void main() {
vec3 worldNormal = normalize(gm_Matrices[MATRIX_WORLD] * vec4(in_Normal, 0.)).xyz;
v_vNormal = worldNormal;
float ndcDepth = (gl_Position.z - planeNear - planeFar) / (planeFar - planeNear);
float depthRange = abs(planeFar - planeNear);
float ndcDepth = (gl_Position.z - planeNear) / depthRange;
v_cameraDistance = ndcDepth * 0.5 + 0.5;
}

View file

@ -0,0 +1,21 @@
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
uniform float progress;
uniform vec2 detail;
uniform vec2 u_resolution;
uniform vec2 position;
uniform vec2 scale;
void main() {
vec2 uv = (v_vTexcoord + position) * scale;
for(float i = detail.x; i <= detail.y; i++) {
uv.x += .5 / i * sin(i * 3. * uv.y + progress);
uv.y += .3 / i * cos(i * 3. * uv.x + progress);
}
float a = .5 + .5 * sin(uv.x);
gl_FragColor = vec4(vec3(a), 1.);
}

View file

@ -0,0 +1,19 @@
//
// Simple passthrough vertex shader
//
attribute vec3 in_Position; // (x,y,z)
//attribute vec3 in_Normal; // (x,y,z) unused in this shader.
attribute vec4 in_Colour; // (r,g,b,a)
attribute vec2 in_TextureCoord; // (u,v)
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main()
{
vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0);
gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos;
v_vColour = in_Colour;
v_vTexcoord = in_TextureCoord;
}

View file

@ -0,0 +1,10 @@
{
"resourceType": "GMShader",
"resourceVersion": "1.0",
"name": "sh_noise_flow",
"parent": {
"name": "noise",
"path": "folders/shader/generator/noise.yy",
},
"type": 1,
}

View file

@ -6,6 +6,7 @@ varying vec4 v_vColour;
uniform float seed;
uniform float progress;
uniform float detail;
uniform vec2 u_resolution;
uniform vec2 position;
uniform vec2 scale;

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

View file

@ -0,0 +1,74 @@
{
"resourceType": "GMSprite",
"resourceVersion": "1.0",
"name": "s_node_flow_noise",
"bbox_bottom": 63,
"bbox_left": 0,
"bbox_right": 63,
"bbox_top": 0,
"bboxMode": 0,
"collisionKind": 1,
"collisionTolerance": 0,
"DynamicTexturePage": false,
"edgeFiltering": false,
"For3D": false,
"frames": [
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"ca846195-d720-444c-94e8-0bb21a581395",},
],
"gridX": 0,
"gridY": 0,
"height": 64,
"HTile": false,
"layers": [
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"50a45570-fcb4-4eb4-84f6-423e422a8483","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
],
"nineSlice": null,
"origin": 4,
"parent": {
"name": "generator",
"path": "folders/nodes/icons/generator.yy",
},
"preMultiplyAlpha": false,
"sequence": {
"resourceType": "GMSequence",
"resourceVersion": "1.4",
"name": "s_node_flow_noise",
"autoRecord": true,
"backdropHeight": 768,
"backdropImageOpacity": 0.5,
"backdropImagePath": "",
"backdropWidth": 1366,
"backdropXOffset": 0.0,
"backdropYOffset": 0.0,
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"eventStubScript": null,
"eventToFunction": {},
"length": 1.0,
"lockOrigin": false,
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
"playback": 1,
"playbackSpeed": 30.0,
"playbackSpeedType": 0,
"showBackdrop": true,
"showBackdropImage": false,
"timeUnits": 1,
"tracks": [
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"ca846195-d720-444c-94e8-0bb21a581395","path":"sprites/s_node_flow_noise/s_node_flow_noise.yy",},},},"Disabled":false,"id":"f8b18a5d-af37-49f3-896f-647bc2151389","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
],
"visibleRange": null,
"volume": 1.0,
"xorigin": 32,
"yorigin": 32,
},
"swatchColours": null,
"swfPrecision": 2.525,
"textureGroupId": {
"name": "Default",
"path": "texturegroups/Default",
},
"type": 0,
"VTile": false,
"width": 64,
}