MGFX
MGFX is the Lux rendering package for Garry's Mod immediate UI effects. It is
distributed as the standalone lux-mgfx package set and is documented in its
own site:
This page is only the Lux-site entry point. Use the standalone MGFX documentation for API details, shader notes, performance guidance, and the Lux-based architecture.
Install it per project:
Use with Plain GLua
MGFX is not limited to projects that already write Lux source. For existing
VGUI panels, gamemode UI, or gradual migration work, use the generated
loader-based distribution and call the installed MGFX.* facade from plain
GLua:
The distribution still comes from the Lux MGFX package. The difference is that
the loader has already been generated, initializes the client runtime, and
installs MGFX globally for non-Lux callers.
Use from Lux
New Lux code should prefer explicit module imports such as mgfx.paint,
mgfx.style, mgfx.frame, and mgfx.widgets. The MGFX.* global facade is
for GLua-facing code, old panels, console demos, and gradual migration.
What Lux Handles
@lux/mgfx is client-only. When a project imports it, luxc gmod build
compiles the required module parts, keeps realm exports client-scoped, emits
generated Lua, and generates the GMod loader. The package root comes from the
project lockfile after installation; it is not bundled with luxc. Do not copy
the old MGFX Lua autorun loader into a Lux project.
MGFX is also a practical example of Lux package design: one package is split
into submodules such as frame, paint, style, text, widgets,
materials, and shaderpack, while module parts share internal scope and
export only the public API.
License
MGFX is licensed separately for non-commercial use. Commercial use requires a separate written license from the copyright holder. The standalone MGFX docs repository contains the current license files and deployment notes.