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.