docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ComputeBufferDesc

    Descriptor used to create compute buffer resources

    Inherited Members
    ValueType.Equals(object)
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Experimental.Rendering.RenderGraphModule
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public struct ComputeBufferDesc

    Constructors

    ComputeBufferDesc(int, int)

    ComputeBufferDesc constructor.

    Declaration
    public ComputeBufferDesc(int count, int stride)
    Parameters
    Type Name Description
    int count

    Number of elements in the buffer.

    int stride

    Size of one element in the buffer.

    ComputeBufferDesc(int, int, ComputeBufferType)

    ComputeBufferDesc constructor.

    Declaration
    public ComputeBufferDesc(int count, int stride, ComputeBufferType type)
    Parameters
    Type Name Description
    int count

    Number of elements in the buffer.

    int stride

    Size of one element in the buffer.

    ComputeBufferType type

    Type of the buffer.

    Fields

    count

    Number of elements in the buffer..

    Declaration
    public int count
    Field Value
    Type Description
    int

    name

    Compute Buffer name.

    Declaration
    public string name
    Field Value
    Type Description
    string

    stride

    Size of one element in the buffer. Has to match size of buffer type in the shader.

    Declaration
    public int stride
    Field Value
    Type Description
    int

    type

    Type of the buffer, default is ComputeBufferType.Default (structured buffer).

    Declaration
    public ComputeBufferType type
    Field Value
    Type Description
    ComputeBufferType

    Methods

    GetHashCode()

    Hash function

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int

    The texture descriptor hash.

    Overrides
    ValueType.GetHashCode()
    In This Article
    Back to top
    Copyright © 2025 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)