docs.unity.cn
    Show / Hide Table of Contents

    Class ConstantBuffer<CBType>

    An instance of a constant buffer.

    Inheritance
    Object
    ConstantBufferBase
    ConstantBuffer<CBType>
    Namespace: UnityEngine.Rendering
    Syntax
    public class ConstantBuffer<CBType> : ConstantBufferBase where CBType : struct
    Type Parameters
    Name Description
    CBType

    The type of structure representing the constant buffer data.

    Constructors

    ConstantBuffer()

    Constant Buffer constructor.

    Declaration
    public ConstantBuffer()

    Methods

    PushGlobal(in CBType, Int32)

    Update the GPU data of the constant buffer and bind it globally.

    Declaration
    public void PushGlobal(in CBType data, int shaderId)
    Parameters
    Type