Shapes
Shapes is a real-time vector graphics library with high-quality line drawing and infinite resolution shapes, rendered with advanced anti-aliasing techniques
Website • Docs • Changelog • Feedback Center • Forum Thread • Twitter
Features
• High quality line drawing with arbitrary thickness with advanced anti-aliasing
• Thickness units can be specified meters, pixels or noots
• 2D Shapes such as Polyline, Disc, Arc, Pie, Rectangle, and more
• 3D Shapes such as Sphere, Torus, Cuboid, Cone, 3D line, and more
• Easy-to-use component-based shapes with tweakable parameters
• Source code included for maximum flexibility
• Immediate-mode API for code-based drawing, with scene view gizmo support
• Heavily GPU based. Tweaking parameters is practically free
• GPU instancing support
• Built-in (BIRP),URP, & HDRP support
• Single-pass instanced VR rendering support
--
After Shader Forge, I wanted to make something different. It has bothered me for a long time that for some reason, html5 canvas is better at drawing primitives than Unity. I really wanted something to help us make those crisp lines, discs, polylines and, well, Shapes! So, here we are~
If you share your work on Twitter, don't hesitate to tag me or use #madewithshapes
I'd love to see your work! ♥
Release Notes
Full changelog: https://acegikmo.com/shapes/changelog/
[4.5.1]
Features
- Added helper methods to TextElement to append strings without allocations (#667)
Breaking Changes
- Passing null into Draw.Text will now leave the text unchanged instead of clearing it
Fixes
- Fixed a bug where Shapes components would use the wrong material assets, followed by trying to destroy them (#640, #654, #666)
- Fixed a deprecation warning in Unity 6 (#653)
- Fixed fillable shapes not respecting HDR color picker setting (#668)
- Fixed GC allocations in URP immediate mode (#661)
- Added overloads for drawing text without assigning a new string (#667)
[4.5.0]
Features
- Immediate mode text can now be curved (#632)
- Use Draw.TextCurvature = 1/r; to match a circle with radius rDraw.TextCurvature determines how much the text should bend
<0 bends the text downwards like ⋂
=0 keeps the text straight like —
>0 bends the text upwards like ⋃
Curvature is in units of inverse meters, or, radians turned per meter traversed along the text
- Note that this is not the center of a circle you might want to place the text alongDraw.TextCurvaturePivot
The "pinned" point in the local space of the text, that remains fixed when bending.
It defaults to the pivot point of (0,0), which is usually what you want.
Breaking Changes
- Immediate mode text now uses the TextWrappingModes enum. Note that the additional wrap options only work in Unity 6 and above
Fixes
- Fixed Unity 6 URP immediate mode not working without compatibility mode (#631)
- Fixed Unity 6 BIRP compiler error (#634)
- Fixed Unity 6 HDRP obsolete warnings
- Fixed a couple of FindObjectOfType deprecation warnings
[4.4.0]
Features & Breaking Changes
- Unity 6 Render Graph support (#629)
- Minimum Unity version is now 2022.3
- Shape components are now frustum culled by default, with a new culling setting (#270, #621)
- SimpleGlobal is the old behavior, uses a bound the size of the observable universe, as specified in the Shapes settings, effectively disabling frustum culling
- CalculatedLocal is the new default behavior, which enables frustum culling. note: This cannot take into account screen-space sizing, in that case you'll need to manually expand the bounds with the new property below
- You can pad the local bounds with the BoundsPadding property, padding the bounding box on each axis by the given amount, in local space meters
Fixes
- Immediate Mode Canvas UI is now much more stable (#626, #568)
- Immediate mode panels now respect the transformation hierarchy
- Immediate mode panels are now always style-scoped and panel-relative
- Immediate mode panels now respect editor object visibility state
- All canvas camera modes are supported, though note that shapes are drawn underneath Unity's overlay
- IM canvas should now only render in the appropriate cameras
- Added buttons for automatically adding the Shapes render feature to URP renderers
- Fixed temporary polylines and polygons not rendering in URP/HDRP (#625)
- Fixed allocation issues with Shape components (#609)
- Fixed polylines not regenerating the mesh when using less than 2 points (#604, #628)
- Fixed gles shader warning (#627)
- Shapes menu is now under Tools/Shapes (#574)
- Fixed a quad color output bug at the lowest interpolation quality (#)
- Added RemovePointAt to PointPath (#)
- Fixed polylines not always regenerating its mesh when setting points (#)
- Fixed immediate mode mesh drawing material property block issue (#)