Exemplo n.º 1
0
        public bool EqualsAsKey(TextureExportParam other)
        {
            if (ExportType != other.ExportType)
            {
                return(false);
            }

            switch (ExportType)
            {
            case TextureExportTypes.Srgb:
            case TextureExportTypes.Linear:
            case TextureExportTypes.Normal:
                return(PrimaryTexture == other.PrimaryTexture);

            case TextureExportTypes.OcclusionMetallicRoughness:
                return(PrimaryTexture == other.PrimaryTexture &&
                       SecondaryTexture == other.SecondaryTexture);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
Exemplo n.º 2
0
        public bool EqualsAsKey(TextureExportParam other)
        {
            if (ExportType != other.ExportType)
            {
                return(false);
            }

            switch (ExportType)
            {
            case TextureExportTypes.Srgb:
            case TextureExportTypes.Linear:
            case TextureExportTypes.Normal:
                return(PrimaryTexture == other.PrimaryTexture);

            case TextureExportTypes.OcclusionMetallicRoughness:
                var primaryDifference   = PrimaryTexture != other.PrimaryTexture ? 1 : 0;
                var secondaryDifference = SecondaryTexture != other.SecondaryTexture ? 1 : 0;
                var difference          = primaryDifference + secondaryDifference;
                return(difference < 2);

            default:
                throw new ArgumentOutOfRangeException();
            }
        }