The base class for all brushes. Users should extend one of the MudSolid, MudDistortion, or MudModifier classes to create custom brushes.
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.
Registers a static method with signature
SdfBrushEvalFunc for a specific brush type for CPU-based SDF brush computation.
Low-level interface for CPU-based SDF evaluation. Used by renderers internally. Tinker at your own risk.
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 value and/or normal (normalized gradient) evaluation result.
Signature for static methods meant to be tagged with
RegisterSdfBrushEvalFuncAttribute for CPU-based SDF brush computation.