Exemple #1
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;
                    }
                }
            }
        }