/**
* Copyright(c) Live2D Inc. All rights reserved.
*
* Use of this source code is governed by the Live2D Open Software license
* that can be found at https://www.live2d.com/eula/live2d-open-software-license-agreement_en.html.
*/
using UnityEngine;
namespace Live2D.Cubism.Rendering.Masking
{
///
/// Single mask tile.
///
public struct CubismMaskTile
{
#region Conversion
///
/// Converts a to a .
///
/// Value to convert.
public static implicit operator Vector4(CubismMaskTile value)
{
return new Vector4
{
x = value.Channel,
y = value.Column,
z = value.Row,
w = value.Size
};
}
#endregion
///
/// Color channel of the tile.
///
///
/// Valid values are 0f, 1f, 2, and 3f.
///
public float Channel;
///
/// Column index of the tile in subdivided texture.
///
public float Column;
///
/// Row index of the tile in subdivided texture.
///
public float Row;
///
/// Size of the tile in texture coordinates.
///
public float Size;
}
}