UnityEngine.Rendering.CommandBuffer.DrawMeshInstanced(UnityEngine.Mesh, int, UnityEngine.Material, int, UnityEngine.Matrix4x4[])

Here are the examples of the csharp api UnityEngine.Rendering.CommandBuffer.DrawMeshInstanced(UnityEngine.Mesh, int, UnityEngine.Material, int, UnityEngine.Matrix4x4[]) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 View Source File : LineMeshes.cs
License : MIT License
Project Creator : microsoft

private void OnWillRenderObject()
        {
            Camera cam = Camera.current;
            CommandBuffer buffer = null;
            if (!cameras.TryGetValue(cam, out buffer))
            {
                buffer = new CommandBuffer();
                buffer.name = "Line Mesh Renderer " + cam.name;
                cam.AddCommandBuffer(CameraEvent.AfterForwardOpaque, buffer);
                cameras.Add(cam, buffer);
            }

            buffer.Clear();
            if (executeCommandBuffer)
            {
                buffer.DrawMeshInstanced(LineMesh, 0, LineMaterial, 0, meshTransforms, meshTransforms.Length, linePropertyBlock);
            }
        }