From da3c628ec2a191204818e45accf66ec4cb881b0d Mon Sep 17 00:00:00 2001 From: Tanasart Date: Wed, 9 Oct 2024 08:56:39 +0700 Subject: [PATCH] [Inspector Panel] Fix matrixbox display inline in spacious view. --- scripts/nodeValue_drawer/nodeValue_drawer.gml | 2 +- scripts/node_shape/node_shape.gml | 11 ++++------- shaders/sh_convolution/sh_convolution.fsh | 2 ++ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index c9596da54..68e0c3119 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -34,7 +34,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc break; case "matrixGrid" : - breakLine = wid.size > 5; + breakLine |= wid.size > 5; break; } diff --git a/scripts/node_shape/node_shape.gml b/scripts/node_shape/node_shape.gml index 382756a74..8dc5ea948 100644 --- a/scripts/node_shape/node_shape.gml +++ b/scripts/node_shape/node_shape.gml @@ -36,13 +36,10 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con newInput(1, nodeValue_Bool("Background", self, false)); shape_types = [ - "Rectangle", "Diamond", "Trapezoid", "Parallelogram", - -1, - "Ellipse", "Arc", "Donut", "Crescent", "Disk Segment", "Pie", "Squircle", - -1, - "Regular polygon", "Star", "Cross", "Rounded Cross", - -1, - "Teardrop", "Leaf", "Heart", "Arrow", "Gear", + "Rectangle", "Diamond", "Trapezoid", "Parallelogram", + -1, "Ellipse", "Arc", "Donut", "Crescent", "Disk Segment", "Pie", "Squircle", + -1, "Regular polygon", "Star", "Cross", "Rounded Cross", + -1, "Teardrop", "Leaf", "Heart", "Arrow", "Gear", ]; shape_types_str = []; diff --git a/shaders/sh_convolution/sh_convolution.fsh b/shaders/sh_convolution/sh_convolution.fsh index 63636d63f..453ee8681 100644 --- a/shaders/sh_convolution/sh_convolution.fsh +++ b/shaders/sh_convolution/sh_convolution.fsh @@ -37,6 +37,8 @@ void main() { sum = 0.; int amo = size * size; for(int i = 0; i < amo; i++) sum += kernel[i]; + + if(sum == 0.) sum = 1.; } float st = -(float(size) - 1.) / 2.;