
Shapely is a shape generation tool for single CPU, multi-threaded CPU and GPU. Draw items with lines, arrows etc., or just render a lot of polygonal shapes.The shaders used to render the shapes are URP only.Often we need to draw shapes in our game world - maybe for maps or terrain, around characters, highlighters etc. Or perhaps we're still in development mode, what if we need to display arrows for our units to indicate their movement, vision range etc.This is a very high performance package made to do just that, it comes with various processing modes that increase in complexity.The tool can render different shapes out of the box, segmented or solid with different color options.Processing Modes:The simplest is the single CPU methods, they are the easiest to modifyAfter that we have C# Task.Factory, it allows for multi-threading but does generate garbageWe also include Thready versions, which is for our as of yet unreleased C# managed threadpool that doesn't generate garbage, and is about 2-3 times as fast as TaskThen we have Burst for optimal CPU performance, due to SIMD it will be about up to 8x as fast as single CPU. All these use the Advanced MeshAPI to creates meshesFinally we have GPU Compute Shaders. Instead of generating a mesh we create the vertices/indices on the GPU and pass them directly into our material for renderingShapes:LinesArrowsCrosses (X Shapes)Polygons from 3 - N edgesAll lines for the shapes can be either solid or segmented, alternating between visible and invisible.All items are created based on a 3d position in the world, by default facing up. Apply a world rotation, scale and offset to change their direction.We use a secondary 3d value which may be set as a point, or as a direction vector.Basic built-in animation for the width/length is included, as well as rotation for shapes.Colors:Single color applied to allPer Item colorPer Vertex colors