docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct SplineComputeBufferScope<T>

    SplineComputeBufferScope is a convenient way to extract from a spline the information necessary to evaluate spline values in a ComputeShader. To access Spline evaluation methods in a shader, include the "Splines.cginc" file:

    #include "Packages/com.unity.splines/Shader/Spline.cginc"
    Implements
    IDisposable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: UnityEngine.Splines
    Assembly: solution.dll
    Syntax
    public struct SplineComputeBufferScope<T> : IDisposable where T : ISpline
    Type Parameters
    Name Description
    T

    The type of spline.

    Constructors

    Name Description
    SplineComputeBufferScope(T)

    Create a new SplineComputeBufferScope.

    Properties

    Name Description
    CurveLengths

    A ComputeBuffer containing the cached length of all spline curves.

    Curves

    A ComputeBuffer containing BezierCurve.

    Info

    Returns a SplineInfo Vector4.

    Methods

    Name Description
    Bind(ComputeShader, int, string, string, string)

    Set up a shader with all of the necessary ComputeBuffer and Spline metadata for working with functions found in Spline.cginc.

    Dispose()

    Free resources allocated by this object.

    Upload()

    Copy Spline curve, info, and length caches to their GPU buffers.

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