docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ConstantBuffer<CBType>

    An instance of a constant buffer.

    Inheritance
    object
    ConstantBufferBase
    ConstantBuffer<CBType>
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Rendering
    Assembly: Unity.RenderPipelines.Core.Runtime.dll
    Syntax
    public class ConstantBuffer<CBType> : ConstantBufferBase where CBType : struct
    Type Parameters
    Name Description
    CBType

    The type of structure representing the constant buffer data.

    Constructors

    Name Description
    ConstantBuffer()

    Constant Buffer constructor.

    Methods

    Name Description
    PushGlobal(CommandBuffer, in CBType, int)

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

    PushGlobal(in CBType, int)

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

    Release()

    Release the constant buffers.

    Set(ComputeShader, int)

    Bind the constant buffer to a compute shader.

    Set(Material, int)

    Bind the constant buffer to a material.

    Set(CommandBuffer, ComputeShader, int)

    Bind the constant buffer to a compute shader via a command buffer.

    SetGlobal(int)

    Bind the constant buffer globally.

    SetGlobal(CommandBuffer, int)

    Bind the constant buffer globally via a command buffer.

    UpdateData(CommandBuffer, in CBType)

    Update the GPU data of the constant buffer via a command buffer.

    UpdateData(in CBType)

    Update the GPU data of the constant buffer.

    Extension Methods

    AnalyticsUtils.ToNestedColumnWithDefault<T>(T, T, bool)
    AnalyticsUtils.ToNestedColumn<T>(T, bool)
    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)