private void DrawSingle([NotNull] CommandBuffer cmd, [NotNull] WetDecalSystem.DecalRenderInstance decal, int shaderPass) { if (cmd == null) { throw new ArgumentNullException("cmd"); } if (decal == null) { throw new ArgumentNullException("decal"); } if (decal.Decal.Settings.Shape == DecalShape.Mesh) { if (decal.Decal.Mesh != null) { var mesh = decal.Decal.Mesh; for (var i = 0; i < mesh.subMeshCount; i++) { cmd.DrawMesh(mesh, decal.Decal.WorldTransform, Batch.GetMaterial(false), i, shaderPass, decal.PropertyBlock); } } } else { cmd.DrawMesh(_box, decal.Decal.WorldTransform, Batch.GetMaterial(false), 0, shaderPass, decal.PropertyBlock); } }
private void DrawSingle([NotNull] CommandBuffer cmd, [NotNull] WetDecalSystem.DecalRenderInstance decal, int shaderPass) { if (decal == null) { throw new ArgumentNullException("decal"); } cmd.DrawMesh(_box, decal.Decal.WorldTransform, Batch.GetMaterial(false), 0, shaderPass, decal.PropertyBlock); }