Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Typo in doc for Graphics.RenderPrimitivesIndexedIndirect?

Discussion in 'General Graphics' started by Ian-Snow, Oct 7, 2023.

  1. Ian-Snow

    Ian-Snow

    Joined:
    Sep 2, 2015
    Posts:
    3
    Hi all,

    In the doc:
    https://docs.unity3d.com/ScriptReference/Graphics.RenderPrimitivesIndexedIndirect.html

    Under Parameters it reads:
    "(... GraphicsBuffer commandBuffer, int commandCount = 1 ...)"
    "commandBuffer A command buffer that provides rendering command arguments (see IndirectDrawIndexedArgs)."
    "commandCount The number of rendering commands to execute in the commandBuffer."

    It should be:
    "GraphicsBuffer graphicsBuffer, int indirectArgsCount = 1"
    "graphicsBuffer A Graphics buffer that provides Indirect arguments for primitives rendering (see IndirectDrawIndexedArgs)."
    "graphicsCount The number of primitives to render in the graphicsBuffer."

    Right? Since there is no commands used anywhere, but only a buffer for storing some IndirectArgs for the primitives in the GraphicsBuffer?

    Best,
    Ian
     
  2. Ian-Snow

    Ian-Snow

    Joined:
    Sep 2, 2015
    Posts:
    3
    Actually I just found out myself why they are called that way, each of those Command Indirect Args in commandBuff and commandData is actually for a "custom command" which you can implement yourself in the shader on the same doc page using:

    uint cmdID = GetCommandID(0);