diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 826c24381..60372089d 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -752,7 +752,7 @@ function __initNodes() { addNodeObject(generator, "Flood Fill", s_node_flood_fill, "Node_Flood_Fill", [1, Node_Flood_Fill],, "Filled connected pixel given position and color.").setVersion(1133); ds_list_add(generator, "Ray March"); - addNodeObject(generator, "RM Primitive", s_node_rm_primitive, "Node_RM_Primitive", [1, Node_RM_Primitive]).setVersion(11720); + addNodeObject(generator, "RM Primitive", s_node_rm_primitive, "Node_RM_Primitive", [1, Node_RM_Primitive], ["ray marching"]).setVersion(11720); ds_list_add(generator, "MK Effects"); addNodeObject(generator, "MK Rain", s_node_mk_rain, "Node_MK_Rain", [1, Node_MK_Rain]).setVersion(11600); diff --git a/scripts/node_rm_primitive/node_rm_primitive.gml b/scripts/node_rm_primitive/node_rm_primitive.gml index 9ad1fe49c..426e5a7bc 100644 --- a/scripts/node_rm_primitive/node_rm_primitive.gml +++ b/scripts/node_rm_primitive/node_rm_primitive.gml @@ -317,6 +317,8 @@ function Node_RM_Primitive(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro for (var i = 0, n = array_length(temp_surface); i < n; i++) shader_set_surface($"texture{i}", temp_surface[i]); + shader_set_f("time", CURRENT_FRAME / TOTAL_FRAMES); + shader_set_i("shape", _shpI); shader_set_f("size", _size); shader_set_f("radius", _rad); diff --git a/scripts/panel_palette_mixer/panel_palette_mixer.gml b/scripts/panel_palette_mixer/panel_palette_mixer.gml index e044163b6..dc1e735aa 100644 --- a/scripts/panel_palette_mixer/panel_palette_mixer.gml +++ b/scripts/panel_palette_mixer/panel_palette_mixer.gml @@ -50,7 +50,7 @@ function Panel_Palette_Mixer() : PanelContent() constructor { node_hovering = noone; node_dragging = noone; node_drag_mx = 0; - node_drag_my = 0; + node_drag_my = 0; node_drag_sx = 0; node_drag_sy = 0; node_selecting = noone; diff --git a/shaders/sh_rm_primitive/sh_rm_primitive.fsh b/shaders/sh_rm_primitive/sh_rm_primitive.fsh index 0ade4a83d..4eec61974 100644 --- a/shaders/sh_rm_primitive/sh_rm_primitive.fsh +++ b/shaders/sh_rm_primitive/sh_rm_primitive.fsh @@ -18,6 +18,8 @@ uniform sampler2D texture1; uniform sampler2D texture2; uniform sampler2D texture3; +uniform float time; + uniform int shape; uniform vec3 size; uniform float radius; @@ -306,7 +308,7 @@ mat3 rotMatrix, irotMatrix; vec4 sm = sampleTexture(extrudeSurface, pos); float am = (sm.r + sm.g + sm.b) / 3. * sm.a; - float d = 0.1 - am; + float d = 0.3 - am; vec2 w = vec2( d, abs(p.y) - h ); return min(max(w.x, w.y), 0.0) + length(max(w, 0.0)); } @@ -486,9 +488,6 @@ void main() { if(dist > viewRange.y - EPSILON) // Not hitting anything. return; - // if(sin(wcoll.y * 64.) > -.9) - // return; - vec3 c = ambient.rgb; float distNorm = 1. - (dist - viewRange.x) / (viewRange.y - viewRange.x); @@ -501,5 +500,8 @@ void main() { c *= lamo; + // if(sin((wcoll.y + time * PI * 2.) * 96.) < -.9) + // c *= 4.; + gl_FragColor = vec4(c, 1.); } \ No newline at end of file diff --git a/sprites/s_node_rm_primitive/1edabec3-254d-42f4-8d2c-52898860ab0c.png b/sprites/s_node_rm_primitive/1edabec3-254d-42f4-8d2c-52898860ab0c.png new file mode 100644 index 000000000..761e22440 Binary files /dev/null and b/sprites/s_node_rm_primitive/1edabec3-254d-42f4-8d2c-52898860ab0c.png differ diff --git a/sprites/s_node_rm_primitive/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd.png b/sprites/s_node_rm_primitive/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd.png deleted file mode 100644 index 71a5d2cd3..000000000 Binary files a/sprites/s_node_rm_primitive/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd.png and /dev/null differ diff --git a/sprites/s_node_rm_primitive/layers/1edabec3-254d-42f4-8d2c-52898860ab0c/30e25e94-92fd-4e97-87a4-b6fe46ef67a9.png b/sprites/s_node_rm_primitive/layers/1edabec3-254d-42f4-8d2c-52898860ab0c/30e25e94-92fd-4e97-87a4-b6fe46ef67a9.png new file mode 100644 index 000000000..761e22440 Binary files /dev/null and b/sprites/s_node_rm_primitive/layers/1edabec3-254d-42f4-8d2c-52898860ab0c/30e25e94-92fd-4e97-87a4-b6fe46ef67a9.png differ diff --git a/sprites/s_node_rm_primitive/layers/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd/eae4b9cd-265e-4fa2-9fa6-1e3d16f2efcf.png b/sprites/s_node_rm_primitive/layers/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd/eae4b9cd-265e-4fa2-9fa6-1e3d16f2efcf.png deleted file mode 100644 index 71a5d2cd3..000000000 Binary files a/sprites/s_node_rm_primitive/layers/9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd/eae4b9cd-265e-4fa2-9fa6-1e3d16f2efcf.png and /dev/null differ diff --git a/sprites/s_node_rm_primitive/s_node_rm_primitive.yy b/sprites/s_node_rm_primitive/s_node_rm_primitive.yy index a8a5e30de..d7c979d82 100644 --- a/sprites/s_node_rm_primitive/s_node_rm_primitive.yy +++ b/sprites/s_node_rm_primitive/s_node_rm_primitive.yy @@ -2,24 +2,24 @@ "$GMSprite":"", "%Name":"s_node_rm_primitive", "bboxMode":0, - "bbox_bottom":62, - "bbox_left":6, - "bbox_right":62, - "bbox_top":5, + "bbox_bottom":63, + "bbox_left":2, + "bbox_right":60, + "bbox_top":1, "collisionKind":1, "collisionTolerance":0, "DynamicTexturePage":false, "edgeFiltering":false, "For3D":false, "frames":[ - {"$GMSpriteFrame":"","%Name":"9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd","name":"9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, + {"$GMSpriteFrame":"","%Name":"1edabec3-254d-42f4-8d2c-52898860ab0c","name":"1edabec3-254d-42f4-8d2c-52898860ab0c","resourceType":"GMSpriteFrame","resourceVersion":"2.0",}, ], "gridX":0, "gridY":0, "height":64, "HTile":false, "layers":[ - {"$GMImageLayer":"","%Name":"eae4b9cd-265e-4fa2-9fa6-1e3d16f2efcf","blendMode":0,"displayName":"default","isLocked":false,"name":"eae4b9cd-265e-4fa2-9fa6-1e3d16f2efcf","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, + {"$GMImageLayer":"","%Name":"30e25e94-92fd-4e97-87a4-b6fe46ef67a9","blendMode":0,"displayName":"default","isLocked":false,"name":"30e25e94-92fd-4e97-87a4-b6fe46ef67a9","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,}, ], "name":"s_node_rm_primitive", "nineSlice":null, @@ -69,8 +69,8 @@ "tracks":[ {"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore":"","Keyframes":[ {"$Keyframe":"","Channels":{ - "0":{"$SpriteFrameKeyframe":"","Id":{"name":"9fcdf9f9-ba78-46c9-b253-0c8ab869e7fd","path":"sprites/s_node_rm_primitive/s_node_rm_primitive.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, - },"Disabled":false,"id":"32fef19e-0a12-4c33-a385-a86daf2a08de","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, + "0":{"$SpriteFrameKeyframe":"","Id":{"name":"1edabec3-254d-42f4-8d2c-52898860ab0c","path":"sprites/s_node_rm_primitive/s_node_rm_primitive.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",}, + },"Disabled":false,"id":"22ee247f-a875-4591-afa7-cb8d52f409c7","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe","resourceVersion":"2.0","Stretch":false,}, ],"resourceType":"KeyframeStore","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, ], "visibleRange":null,