public override int GetHashCode() { if (BlendType == BlendType.None) { return(0); } return(BlendType.GetHashCode() ^ SourceFactor ^ DestinationFactor); }
void GenerateMaterialId() { var textureId = texture == null ? 0 : texture.TextureId; materialId = (uint)textureId << 12 | (uint)BlendType.GetHashCode(); }