Beispiel #1
0
        internal unsafe static bool IsLightmapperSupported(int lightmapper)
        {
            bool result;

            SupportedRenderingFeatures.IsLightmapperSupportedByRef(lightmapper, new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #2
0
        internal unsafe static int FallbackLightmapper()
        {
            int result;

            SupportedRenderingFeatures.FallbackLightmapperByRef(new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #3
0
        internal unsafe static bool IsLightmapBakeTypeSupported(LightmapBakeType bakeType)
        {
            bool result;

            SupportedRenderingFeatures.IsLightmapBakeTypeSupportedByRef(bakeType, new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #4
0
        internal unsafe static bool IsLightmapsModeSupported(LightmapsMode mode)
        {
            bool result;

            SupportedRenderingFeatures.IsLightmapsModeSupportedByRef(mode, new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #5
0
        internal unsafe static bool IsMixedLightingModeSupported(MixedLightingMode mixedMode)
        {
            bool result;

            SupportedRenderingFeatures.IsMixedLightingModeSupportedByRef(mixedMode, new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #6
0
        internal unsafe static MixedLightingMode FallbackMixedLightingMode()
        {
            MixedLightingMode result;

            SupportedRenderingFeatures.FallbackMixedLightingModeByRef(new IntPtr((void *)(&result)));
            return(result);
        }
Beispiel #7
0
        internal unsafe static void IsMixedLightingModeSupportedByRef(MixedLightingMode mixedMode, IntPtr isSupportedPtr)
        {
            bool *ptr  = (bool *)((void *)isSupportedPtr);
            bool  flag = !SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Mixed);

            if (flag)
            {
                *ptr = false;
            }
            else
            {
                *ptr = ((mixedMode == MixedLightingMode.IndirectOnly && (SupportedRenderingFeatures.active.mixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly) == SupportedRenderingFeatures.LightmapMixedBakeModes.IndirectOnly) || (mixedMode == MixedLightingMode.Subtractive && (SupportedRenderingFeatures.active.mixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeModes.Subtractive) == SupportedRenderingFeatures.LightmapMixedBakeModes.Subtractive) || (mixedMode == MixedLightingMode.Shadowmask && (SupportedRenderingFeatures.active.mixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask) == SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask));
            }
        }
Beispiel #8
0
        internal unsafe static void FallbackMixedLightingModeByRef(IntPtr fallbackModePtr)
        {
            MixedLightingMode *ptr = (MixedLightingMode *)((void *)fallbackModePtr);
            bool flag = SupportedRenderingFeatures.active.defaultMixedLightingModes != SupportedRenderingFeatures.LightmapMixedBakeModes.None && (SupportedRenderingFeatures.active.mixedLightingModes & SupportedRenderingFeatures.active.defaultMixedLightingModes) == SupportedRenderingFeatures.active.defaultMixedLightingModes;

            if (flag)
            {
                SupportedRenderingFeatures.LightmapMixedBakeModes defaultMixedLightingModes = SupportedRenderingFeatures.active.defaultMixedLightingModes;
                SupportedRenderingFeatures.LightmapMixedBakeModes lightmapMixedBakeModes    = defaultMixedLightingModes;
                if (lightmapMixedBakeModes != SupportedRenderingFeatures.LightmapMixedBakeModes.Subtractive)
                {
                    if (lightmapMixedBakeModes != SupportedRenderingFeatures.LightmapMixedBakeModes.Shadowmask)
                    {
                        *ptr = MixedLightingMode.IndirectOnly;
                    }
                    else
                    {
                        *ptr = MixedLightingMode.Shadowmask;
                    }
                }
                else
                {
                    *ptr = MixedLightingMode.Subtractive;
                }
            }
            else
            {
                bool flag2 = SupportedRenderingFeatures.IsMixedLightingModeSupported(MixedLightingMode.Shadowmask);
                if (flag2)
                {
                    *ptr = MixedLightingMode.Shadowmask;
                }
                else
                {
                    bool flag3 = SupportedRenderingFeatures.IsMixedLightingModeSupported(MixedLightingMode.Subtractive);
                    if (flag3)
                    {
                        *ptr = MixedLightingMode.Subtractive;
                    }
                    else
                    {
                        *ptr = MixedLightingMode.IndirectOnly;
                    }
                }
            }
        }
Beispiel #9
0
        internal unsafe static void IsLightmapBakeTypeSupportedByRef(LightmapBakeType bakeType, IntPtr isSupportedPtr)
        {
            bool *ptr  = (bool *)((void *)isSupportedPtr);
            bool  flag = bakeType == LightmapBakeType.Mixed;

            if (flag)
            {
                bool flag2 = SupportedRenderingFeatures.IsLightmapBakeTypeSupported(LightmapBakeType.Baked);
                bool flag3 = !flag2 || SupportedRenderingFeatures.active.mixedLightingModes == SupportedRenderingFeatures.LightmapMixedBakeModes.None;
                if (flag3)
                {
                    *ptr = false;
                    return;
                }
            }
            *    ptr   = ((SupportedRenderingFeatures.active.lightmapBakeTypes & bakeType) == bakeType);
            bool flag4 = bakeType == LightmapBakeType.Realtime && !SupportedRenderingFeatures.active.enlighten;

            if (flag4)
            {
                *ptr = false;
            }
        }