docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method Bind

    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.

    Declaration
    public void Bind(ComputeShader shader, int kernel, string info, string curves, string lengths)
    Parameters
    Type Name Description
    ComputeShader shader

    The compute shader to bind.

    int kernel

    The kernel to target.

    string info

    The float4 (typedef to SplineData in Spline.cginc) Spline info.

    string curves

    A StructuredBuffer{BezierCurve} or RWStructuredBuffer{BezierCurve}.

    string lengths

    A StructuredBuffer{float} or RWStructuredBuffer{float}.

    Exceptions
    Type Condition
    ArgumentNullException

    Thrown if any of the expected properties are invalid.

    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)