Namespace MudBun
Classes
MudBrushBase
The base class for all brushes. Users should extend one of the MudSolid, MudDistortion, or MudModifier classes to create custom brushes.
MudDistortion
MudModifier
MudRenderer
A renderer generates and renders dynamic meshes based on the brushes under its transform hierarchy.
It can generate SDF texture generations at dynamically at run-time, which can be combined with Unity's VFX graph for things like GPU particle collision detection.
It also provides various CPU-based utilities that can used for gameplay purposes without needing GPU readbacks:
- SDF evaluation.
- SDF normal (normalized gradient) evaluation.
- Raycasts against mesh surface.
MudSolid
RegisterSdfBrushEvalFuncAttribute
Registers a static method with signature SdfBrushEvalFunc
for a specific brush type for CPU-based SDF brush computation.
Sdf
Low-level interface for CPU-based SDF evaluation. Used by renderers internally. Tinker at your own risk.
Structs
Sdf.Contact
Raycast result.
Sdf.EvalJobHandle
Job handles are associated with SDF evaluation jobs running in parallel. A job handle exposes the interface to query and wait on the completion of its associated job.
Sdf.Ray
Sdf.Result
SDF value and/or normal (normalized gradient) evaluation result.
SdfBrush
SdfBrushMaterial
Delegates
MudRenderer.MeshGenerated
Sdf.SdfBrushEvalFunc
Signature for static methods meant to be tagged with RegisterSdfBrushEvalFuncAttribute
for CPU-based SDF brush computation.