Trim an image to a percentage of its size (webGL and webGPU) ported from a shader by user Somebody
I don't understand how this works because it doesn't seem to work on a percentage base. Like some sprites don't start getting trimmed until I get to 10%. Then in some cases "bottom" trims the right side of the object like the angle of the image is rotated 90 degrees.
Really late reply, originally this was just a port of a c2 shader from user Somebody. But now I have rewritten the shader with a fixes for both of these issues.