Class MeshToSDFBaker
This class allows to bake Signed Distance Fields from Meshes, and holds the necessary data to perform this operation.
Implements
Inherited Members
Namespace: UnityEngine .VFX.SDF
Assembly: Unity.VisualEffectGraph.Runtime.dll
Syntax
public class MeshToSDFBaker : IDisposable
Constructors
Name | Description |
---|---|
Mesh |
Constructor of the class MeshToSDFBaker. |
Mesh |
Constructor of the class MeshToSDFBaker. |
Properties
Name | Description |
---|---|
Sdf |
Returns the texture containing the baked Signed Distance Field |
Methods
Name | Description |
---|---|
Bake |
Performs the baking operation. After this function is called, the resulting SDF is accessible via the property MeshToSDFBaker.SdfTexture. |
Dispose() | Release all the buffers and textures created by the object. This must be called you are finished using the object. |
~Mesh |
This finalizer should never be called. Dispose() should be called explicitly when an MeshToSDFBaker instance is finished being used. |
Get |
Gets the size of the baking box used. |
Get |
Gets the dimensions of the baked texture. |
Reinit(Vector3, Vector3, int, List<Mesh>, List<Matrix4x4>, int, float, float) | Reinitialize the baker with the new lists of meshes and transforms, and provided parameters. |
Reinit(Vector3, Vector3, int, Mesh, int, float, float) | Reinitialize the baker with the new mesh and provided parameters. |