Search Unity

arg buffer problem(Graphics.DrawMeshInstancedIndirect) in compute shader?

Discussion in 'Shaders' started by mahdiii, Apr 29, 2017.

  1. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    856
    Hi all. why do we need to define args array with 5 values? if I define with 4 elements I can not see anything!
    Code (CSharp):
    1. public class CClass{
    2. int[] args={0,0,0,0,0};
    3. void Start(){
    4. args[0]=mesh.GetIndexCount();
    5. args[1]=numInstance;
    6. argBuffer.setData(args);
    7. }
    8. }