public void AddTexture(CommandBuffer cmd, TextureScaleBias textureScaleBias) { if (textureScaleBias.m_Texture != null) { if (!Atlas.AddTexture(cmd, ref textureScaleBias.m_ScaleBias, textureScaleBias.m_Texture)) { m_AllocationSuccess = false; } } else { textureScaleBias.m_ScaleBias = Vector4.zero; } }
public int CompareTo(object obj) { TextureScaleBias other = obj as TextureScaleBias; int size = m_Texture.width * m_Texture.height; int otherSize = other.m_Texture.width * other.m_Texture.height; if (size > otherSize) { return(-1); } else if (size < otherSize) { return(1); } else { return(0); } }