Search Unity

Question have any way to change vertex or indices count on compute shader ?

Discussion in 'General Graphics' started by bbsuuo, Sep 13, 2022.

  1. bbsuuo

    bbsuuo

    Joined:
    Jul 21, 2016
    Posts:
    16
    I'm excited to use the new Mesh API , but i found i can't change vertex or indices count on gpu side when i create some component like tral renderer ,so have any API like computeBuffer.SetCounterValue to change compute size ? or just can calculate vertex count on cpu side and call SetIndexBufferParams ?
     
  2. bbsuuo

    bbsuuo

    Joined:
    Jul 21, 2016
    Posts:
    16
    i find api : GraphicsBuffer.SetCounterValue , but I don't know it's possible mesh.indexBufferTarget |= GraphicsBuffer.Target.Counter , i will try to it ,but the availability of mobile devices is also subject to extensive testing,If you have any experience, I would appreciate it