Draw rounded shapes with ease. RNDX is a lightweight and efficient library designed to make drawing rounded shapes simple, fast, and visually stunning.
Using Shader Model 3.0 No longer uses SM 3.0 (length
/fwidth
) for AA as there was a bug with some edgy cases, RNDX provides perfect anti-aliasing with no performance hit, allowing you to create beautiful interfaces and visuals with ease.
Note
Currently it only works on dev
branch, it used to work on x86-64
but Rubat reverted the changes, so you can only use it on dev
currently.
- Blazing Fast Performance: Optimized for speed, RNDX is incredibly lightweight and efficient. (It will get even faster once we get
mat:SetFloat4()
!) - Perfect Anti-Aliasing: Enjoy smooth, pixel-perfect corners with no performance hit.
- Simple & Intuitive: No complex objects or statesβjust call a function and draw!
- Seamless Integration: Works flawlessly inside
3D2D
andPanel:Paint*
functions without any hacks.
Note
Currently it only works on dev
branch, it used to work on x86-64
but Rubat reverted the changes, so you can only use it on dev
currently.
- Download
RNDX.tar.gz
&rndx.lua
from GitHub releases. - Add the content of
RNDX.tar.gz
to your gmod clientgarrysmod
folder. (Temporarily until we getthirdparty
support!) AddCSLuaFile
&include
rndx.lua
.- VoilΓ ! You're ready to draw rounded shapes with ease. π
hook.Add("HUDPaint", "RNDX Example", function()
local flags = RNDX.NO_TL + RNDX.NO_TR + RNDX.SHAPE_IOS
RNDX.Draw(10, 100, 100, 200, 200, nil, flags + RNDX.BLUR)
RNDX.Draw(10, 100, 100, 200, 200, Color(255, 0, 0, 150), flags)
RNDX.DrawOutlined(10, 100, 100, 200, 200, Color(0, 255, 0), 10, flags)
end)
RNDX.NO_TL
: Disables top-left corner.RNDX.NO_TR
: Disables top-right corner.RNDX.NO_BL
: Disables bottom-left corner.RNDX.NO_BR
: Disables bottom-right corner.RNDX.BLUR
: Use blur for the shape.
RNDX.SHAPE_CIRCLE
RNDX.SHAPE_FIGMA
<-- DefaultRNDX.SHAPE_IOS
Feature | RNDX | Circles | paint | melonstuff |
---|---|---|---|---|
Speed | β‘ Extremely Fast | π Slow with many circles | β‘ Fast | π Slow |
Anti-Aliasing | β Perfect, no performance cost | β None | β Poor (Source Engine AA) | β None |
Ease of Use | π― Simple & Minimal | π― Simple | 𧩠Complex & Bloated | π― Easy |
Documentation | π Clear & Concise | π Good | β Overwhelming & Undocumented | π Good |
RNDX is open-source and free to use. Feel free to contribute or report issues on GitHub!
Make sure to give credits!
- ficool2 - For sdk_screenspace_shaders & finding out that we can use shaders in source engine games!
- Rubat - For allowing us to use shaders in Garry's Mod!
- Svetov/Jaffies/FriendlyStealer - For lots of help throughout the development of RNDX! Also suggested multiple stuff to improve the performance!
- Shadertoy Rounded Code
- Shadertoy Blur Code
- And AI because I don't understand how shaders work!
RNDX: Because drawing rounded shapes should be simple, fast, and beautiful. π