osgSlug is a frontend for the slughorn library, simplifying the usage of the recent OSS release of the Slug technique by Eric Lengyel in OpenSceneGraph.
This project is currently a rapid testing frontend, visualizer, and "proof-of-concept" demo for slughorn (where most of the critical, generic C++ code lives). As of mid-April, 2026, both projects are currently under very active development. Check back regularly to follow our progress, as we have some really great ideas moving forward!
- Demonstrate drawing multiple layers on the SAME QUAD (instead of each having its OWN quad)
- Use
slug_t(instead offloat) everywhere it's appropriate! Potentially even introduceusing Vec3 = osg::Vec3finsideosgSlugnamespace to further reinforce! IMPORTANT Also need to ensure things likesin/cosreturnslug_t, any usage ofosg::DegreesToRadians, etc. - Improved
osgSlug::{Font/Text}support - Add an example showing toggle/cycle layers
- Create a reusable "screen grid" widget
- Audio visualizer effect/demo
- Progress meter demo
- Convert to using better
VertexAtribIPointerwhere appropriate (effectIdandband{Tex,Max}{X,Y}. - Change
slughorn_render.pyto dump SVG for thesave_curves_debug - Add CMake helpers for compiling in each backend
- Slug "mip-mapping"! Starting with osgSlug, introduce the ability to
"short-circuit" the Slug quad based on some "level of detail" rule; when the
shape is some threshold of distance AWAY, revert to simple texture lookup
approximations. NOTE:
slughornMIGHT be able to participate in this optmization as well ... somehow - Fix
numBandsauto-calculation and account for spatial curve distribution, not just count - pybind11 wrapper
- Change
compositestocompositeShapesin serialization, etc - Change the
autoMetricsdefaul totrue - Rename
slughorn-ft2.hpptoslughorn-freetype.hpp - Enforce VERSION compatibility in backends
- UDL types for
slughorn::Key::from{String,Codepoing}, potentially as_ukey,_skeyor similar? - Add additional per-vertex metadata (like which "quad corner" we are)
- Improve
osgSlug::Fontto expose the additional font metrics exposed byslughorn-freetype.hpp(so that theTextobject can do better layout)
- Add
gl_InstanceIDquad creation - Add per-Layer profiling; will requiring profiling per-quad, if that's even possible?
- Convert
osgSlug::Atlasto be anosg::StateAttribute(or behave like one, at least) - Introduce
slughorn-harfbuzz.hpptext API, using Harfbuzz to "shape" it properly. Note: it will necessarily NEED to be built on top of the FreeType2 backend (slughorn-freetype.hpp)! - Qt6 QPainterPath provides moveTo / lineTo / quadTo / cubicTo / closeSubpath via elementAt() iteration; maps cleanly to CurveDecomposer. Quadratics are native to Qt6 (unlike Cairo which works in cubics). QFont / QRawFont provide glyph outline extraction as a potential FreeType2 complement. QSvgRenderer provides SVG loading as a potential NanoSVG complement. Structure to match slughorn-cairo.hpp: decomposePath(QPainterPath, Atlas&).
- Allow
serial::writeJSONfor ANY object (not JUSTAtlas) - Helpers for the
9-slicemethod of a rounded rectangle -
Atlas::createDefaultStateSet()member instead of free function inDrawable.hpp - Sync
TEX_WIDTH/kLogBandTextureWidth; uniform or shader preamble injection - Premultiplied alpha
- Proper depth testing and render order
- Remove
slug_coloruniform remnant from shaders (color is pure vertex attribute now) - Simulate a fragment processing frame in Python and inspect the math
- Tooling for "optimizing" Atlas::build
- Generate tight carrier mesh from Slug coverage via sampling + contour extraction + triangulation (offline). Preserve em-space UVs.
- Generate SDF/MSDF texture data with Python emulator
- Add an
effectId/shapeIdUDL and helper likeslug_t/_cv/cv -
Atlas::Keytype conversion (uint32_t->Codepoint | Namediscriminated union) - Conic subdivision for Skia circular geometry (
iter.conicWeight()) - Minimal Skia
args.gnbuild config (trim from 25GB) - Non-square band grids (
bandMaxX != bandMaxY) - Layer::scale - evaluate for removal; currently only meaningful for FT2/text. All geometry backends leave it at 1.0. If osgSlug::Font / osgSlug::Text take full ownership of font-size-to-world scaling, Layer::scale becomes dead weight and computeQuad could take scale as a call-site parameter instead. Defer until text pipeline stabilizes.
- Live
numBandsslider tool with real-time rebuild + heatmap feedback - VSG adapter (trivial now given
slughornseparation)










