Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

WebGL does not support Material.SetConstantBuffer

Discussion in '2019.1 Beta' started by pcysl5edgo, Mar 12, 2019.

  1. pcysl5edgo

    pcysl5edgo

    Joined:
    Jun 3, 2018
    Posts:
    65
    GPU Instancing is very convenient and efficient.
    I always use Graphics.DrawMeshInstancedIndirect when I made a game.

    WebGL2 doesn't support structured buffer in vertex shader.
    Graphics.DrawMeshInstancedIndirect cannot be used in WebGL2.

    There is another GPU-Instancing API Graphics.DrawMeshInstanced().
    But I could not pass per index data to the material because of the lack of the access to the constant buffer(uniform buffer object).

    I found the new API Material.SetConstantBuffer().
    It is a GREAT API for those who work in the environment lacking of the Structured Buffer.

    I tried and failed using it.
    WebGL runtime doesn't support Material.SetConstantBuffer()!

    Please, please let us use it in WebGL2 runtime.
     
    deus0 likes this.
  2. Schubkraft

    Schubkraft

    Unity Technologies

    Joined:
    Dec 3, 2012
    Posts:
    1,073
    Can you submit a bug report for this please? Thanks!
     
    pcysl5edgo likes this.
  3. pcysl5edgo

    pcysl5edgo

    Joined:
    Jun 3, 2018
    Posts:
    65
    I submit a bug report (Case 1136159).
    Thanks!
     
    LeonhardP likes this.