Exemplo n.º 1
0
        private static RenderMode GetBlendMode(VrmMaterial material)
        {
            if (material.IsKeywordEnabled(KeyAlphaTestOn))
            {
                return(RenderMode.Cutout);
            }
            else if (material.IsKeywordEnabled(KeyAlphaBlendOn))
            {
                switch (material.GetInt(PropZWrite))
                {
                case EnabledIntValue:
                    return(RenderMode.TransparentWithZWrite);

                case DisabledIntValue:
                    return(RenderMode.Transparent);

                default:
                    Console.WriteLine("[GetBlendMode] Invalid ZWrite Int Value.");
                    return(RenderMode.Transparent);
                }
            }
            else
            {
                return(RenderMode.Opaque);
            }
        }
Exemplo n.º 2
0
        private static OutlineColorMode GetOutlineColorMode(VrmMaterial material)
        {
            if (material.IsKeywordEnabled(KeyOutlineColorFixed))
            {
                return(OutlineColorMode.FixedColor);
            }
            if (material.IsKeywordEnabled(KeyOutlineColorMixed))
            {
                return(OutlineColorMode.MixedLighting);
            }

            return(OutlineColorMode.FixedColor);
        }
Exemplo n.º 3
0
        private static OutlineWidthMode GetOutlineWidthMode(VrmMaterial material)
        {
            if (material.IsKeywordEnabled(KeyOutlineWidthWorld))
            {
                return(OutlineWidthMode.WorldCoordinates);
            }
            if (material.IsKeywordEnabled(KeyOutlineWidthScreen))
            {
                return(OutlineWidthMode.ScreenCoordinates);
            }

            return(OutlineWidthMode.None);
        }