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
Inherited Members
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 |
---|---|
Spline |
Create a new SplineComputeBufferScope. |
Properties
Name | Description |
---|---|
Curve |
A ComputeBuffer containing the cached length of all spline curves. |
Curves | A ComputeBuffer containing Bezier |
Info | Returns a SplineInfo Vector4. |
Methods
Name | Description |
---|---|
Bind(Compute |
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. |