{"id":26467470,"url":"https://github.com/srlion/rndx","last_synced_at":"2026-04-01T21:44:31.286Z","repository":{"id":275600996,"uuid":"926544408","full_name":"Srlion/RNDX","owner":"Srlion","description":"Because drawing rounded shapes should be simple, fast, and beautiful. 🇵🇸 🎉 🇵🇸 ","archived":false,"fork":false,"pushed_at":"2026-03-21T10:33:35.000Z","size":1721,"stargazers_count":76,"open_issues_count":3,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-22T01:17:03.276Z","etag":null,"topics":["2d","blur","draw","fast","gmod","mat","material","rounded","rounded-rect","rounded-rectangle","shader","shaders","smooth","texture"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Srlion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"Srlion"}},"created_at":"2025-02-03T12:55:00.000Z","updated_at":"2026-03-21T10:33:18.000Z","dependencies_parsed_at":"2025-04-12T12:29:01.518Z","dependency_job_id":"1afef802-a13e-42f1-86f8-d96cf9a25ac3","html_url":"https://github.com/Srlion/RNDX","commit_stats":null,"previous_names":["srlion/rndx"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/Srlion/RNDX","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Srlion%2FRNDX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Srlion%2FRNDX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Srlion%2FRNDX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Srlion%2FRNDX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Srlion","download_url":"https://codeload.github.com/Srlion/RNDX/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Srlion%2FRNDX/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31292508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T21:15:39.731Z","status":"ssl_error","status_checked_at":"2026-04-01T21:15:34.046Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","blur","draw","fast","gmod","mat","material","rounded","rounded-rect","rounded-rectangle","shader","shaders","smooth","texture"],"created_at":"2025-03-19T14:52:00.908Z","updated_at":"2026-04-01T21:44:31.281Z","avatar_url":"https://github.com/Srlion.png","language":"Lua","readme":"# 🇵🇸 RNDX 🇵🇸\n\n**Draw rounded shapes with ease.**\nRNDX is a lightweight and efficient library designed to make drawing rounded shapes simple, fast, and visually stunning.\n\nUsing Shader Model 3.0, RNDX provides near-perfect anti-aliasing with no performance hit, allowing you to create beautiful interfaces and visuals with ease.\n\n![Screenshot](thumbnail.png)\n![Screenshot](thumbnail2.png)\n![Screenshot](sbot.png)\n\n---\n\n## ✨ Why RNDX?\n\n- **Blazing Fast Performance**: Optimized for speed, RNDX is incredibly lightweight and efficient. _(It will get even faster once we [get `mat:SetFloat4()`](https://github.com/Facepunch/garrysmod-requests/issues/2606)!)_\n- **Perfect Anti-Aliasing**: Enjoy smooth, pixel-perfect corners with no performance hit.\n- **Simple \u0026 Intuitive**: No complex objects or states—just call a function and draw!\n- **Seamless Integration**: Works flawlessly inside `3D2D` and `Panel:Paint*` functions without any hacks.\n\n---\n\n## 🛠️ Get Started\n\n1. Download `rndx.lua` from [GitHub releases](https://github.com/Srlion/RNDX/releases/latest).\n2. Add `rndx.lua` to your project.\n3. Run `include` on `rndx.lua`. (It's already calls `AddCSLuaFile` for you!)\n4. Voilà! You're ready to draw rounded shapes with ease. 🎉\n\n---\n\n## 📐 Usage\n\n```lua\nlocal RNDX = include(\"rndx.lua\")\nhook.Add(\"HUDPaint\", \"RNDX Example\", function()\n    local flags = RNDX.NO_TL + RNDX.NO_TR + RNDX.SHAPE_IOS\n    RNDX.Draw(10, 100, 100, 200, 200, nil, flags + RNDX.BLUR)\n    RNDX.Draw(10, 100, 100, 200, 200, Color(255, 0, 0, 150), flags)\n    RNDX.DrawOutlined(10, 100, 100, 200, 200, Color(0, 255, 0), 10, flags)\nend)\n```\n\n## 📚 Documentation\n\n### Flags\n\n- **`RNDX.NO_TL`**: Disables top-left corner.\n- **`RNDX.NO_TR`**: Disables top-right corner.\n- **`RNDX.NO_BL`**: Disables bottom-left corner.\n- **`RNDX.NO_BR`**: Disables bottom-right corner.\n- **`RNDX.BLUR`**: Use blur for the shape.\n- **`RNDX.MANUAL_COLOR`**: Allows setting the color via `surface.SetDrawColor`.\n\n---\n\n- **`RNDX.SHAPE_CIRCLE`**\n- **`RNDX.SHAPE_FIGMA`** \u003c-- Default\n- **`RNDX.SHAPE_IOS`**\n\n![Screenshot](shapes.jpg)\n\n---\n\n### Functions\n\n### `RNDX.Draw(rad, x, y, w, h, col, flags)`\n\n### `RNDX.DrawOutlined(rad, x, y, w, h, col, thickness, flags)`\n\n### `RNDX.DrawTexture(rad, x, y, w, h, col, texture, flags)`\n\n### `RNDX.DrawMaterial(rad, x, y, w, h, col, mat, flags)`\n\n### `RNDX.DrawCircle(x, y, r, col, flags)` \u003c-- Just a wrapper for `RNDX.Draw` with `RNDX.SHAPE_CIRCLE`.\n\n### `RNDX.DrawCircleOutlined(x, y, r, col, thickness, flags)`\n\n### `RNDX.DrawCircleTexture(x, y, r, col, texture, flags)`\n\n### `RNDX.DrawCircleMaterial(x, y, r, col, mat, flags)`\n\n---\n\n## 🚀 Why Choose RNDX Over Alternatives?\n\n| Feature           | RNDX                            | [Circles](https://github.com/SneakySquid/Circles) | [paint](https://github.com/Jaffies/paint) | [melonstuff](https://github.com/melonstuff) |\n| ----------------- | ------------------------------- | ------------------------------------------------- | ----------------------------------------- | ------------------------------------------- |\n| **Speed**         | ⚡ Extremely Fast               | 🐌 Slow with many circles                         | ⚡ Fast                                   | 🐌 Slow                                     |\n| **Anti-Aliasing** | ✅ Perfect, no performance cost | ❌ None                                           | ❌ Poor (Source Engine AA)                | ❌ None                                     |\n| **Ease of Use**   | 🎯 Simple \u0026 Minimal             | 🎯 Simple                                         | 🧩 Complex \u0026 Bloated                      | 🎯 Easy                                     |\n| **Documentation** | 📖 Clear \u0026 Concise              | 📖 Good                                           | ❌ Overwhelming \u0026 Undocumented            | 📖 Good                                     |\n\n---\n\n## Benchmarks\n\nBenchmarking has to be done with FPS meter, not checking how long cpu takes to draw.\n\n#### Rounded Shapes\n\n```lua\nlocal RNDX = include(\"rndx.lua\")\nlocal draw_RoundedBox = draw.RoundedBox\nlocal col = Color(0, 0, 0, 255)\nhook.Add(\"HUDPaint\", \"my_shader_draw\", function()\n\tfor i = 1, 3000 do\n\t\tRNDX.Draw(20, 20, 20, 200, 200, col)\n\t\t-- draw_RoundedBox(20, 20, 20, 200, 200, col)\n\tend\nend)\n```\n\n- `RNDX`: 140 FPS\n- `draw.RoundedBox`: 43 FPS\n\n#### Blur\n\n150 Calls\n`x y w h` of `10, 10, 700, 700`\n\n- `Current RNDX`: 107 fps\n- `Previous RNDX`: 73 fps\n- https://pastebin.com/urx4Qvez : 59 fps\n\n## 📜 License\n\nRNDX is open-source and free to use. Feel free to contribute or report issues on GitHub!\n\nMake sure to give credits!\n\n---\n\n## 🌟 Credits\n\n- [ficool2](https://github.com/ficool2) - For [sdk_screenspace_shaders](https://github.com/ficool2/sdk_screenspace_shaders) \u0026 finding out that we can use shaders in source engine games!\n- [Rubat](https://github.com/robotboy655) - For allowing us to use shaders in Garry's Mod!\n- [Svetov/Jaffies/FriendlyStealer](https://github.com/Jaffies) - For lots of help throughout the development of RNDX! Also suggested multiple stuff to improve the performance!\n- [Shadertoy Rounded Code](https://www.shadertoy.com/view/fsdyzB)\n- [Shadertoy Blur Code](https://www.shadertoy.com/view/Xd33Rf)\n- And AI because I don't understand how shaders work!\n\n**RNDX**: Because drawing rounded shapes should be simple, fast, and beautiful. 🎉\n","funding_links":["https://github.com/sponsors/Srlion"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrlion%2Frndx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsrlion%2Frndx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsrlion%2Frndx/lists"}