docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class MeshToSDFBaker

    This class allows to bake Signed Distance Fields from Meshes, and holds the necessary data to perform this operation.

    Inheritance
    object
    MeshToSDFBaker
    Implements
    IDisposable
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.VFX.SDF
    Assembly: Unity.VisualEffectGraph.Runtime.dll
    Syntax
    public class MeshToSDFBaker : IDisposable

    Constructors

    Name Description
    MeshToSDFBaker(Vector3, Vector3, int, List<Mesh>, List<Matrix4x4>, int, float, float, CommandBuffer)

    Constructor of the class MeshToSDFBaker.

    MeshToSDFBaker(Vector3, Vector3, int, Mesh, int, float, float, CommandBuffer)

    Constructor of the class MeshToSDFBaker.

    Properties

    Name Description
    SdfTexture

    Returns the texture containing the baked Signed Distance Field

    Methods

    Name Description
    BakeSDF()

    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.

    ~MeshToSDFBaker()

    This finalizer should never be called. Dispose() should be called explicitly when an MeshToSDFBaker instance is finished being used.

    GetActualBoxSize()

    Gets the size of the baking box used.

    GetGridSize()

    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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)