Ejemplo n.º 1
0
 public static void DrawInstanced(CommandBuffer commandBuffer, Vector2[] positions, Vector3 scale, int count, Material mat, MaterialPropertyBlock props = null)
 {
     Matrix4x4[] matricies = new Matrix4x4[positions.Length];
     for (int i = 0; i < positions.Length; i++)
     {
         matricies[i] = Matrix4x4.TRS(positions[i], DefaultRotation, scale);
     }
     commandBuffer.DrawMeshInstanced(s_texMesh, 0, mat, 0, matricies, count, props);
 }
Ejemplo n.º 2
0
 public static void DrawTextureInstanced(CommandBuffer commandBuffer, Matrix4x4[] matricies, int count, Material mat, MaterialPropertyBlock props)
 {
     commandBuffer.DrawMeshInstanced(s_texMesh, 0, mat, 0, matricies, count, props);
 }