Example #1
0
        internal static unsafe void IsLightmapBakeTypeSupportedByRef(LightmapBakeType bakeType, IntPtr isSupportedPtr)
        {
            var isSupported = (bool *)isSupportedPtr;

            if (bakeType == LightmapBakeType.Mixed)
            {
                // we can't have Mixed without Bake
                bool isBakedSupported = IsLightmapBakeTypeSupported(LightmapBakeType.Baked);

                // we can't support Mixed mode and then not support any of the different modes
                if (!isBakedSupported || active.mixedLightingModes == LightmapMixedBakeModes.None)
                {
                    *isSupported = false;
                    return;
                }
            }

            *isSupported = ((active.lightmapBakeTypes & bakeType) == bakeType);

            // if we are using realtime GI on a new project and Enlighten has been deprecated, don't allow realtime GI
            if (bakeType == LightmapBakeType.Realtime && !active.enlighten && !GraphicsSettings.AllowEnlightenSupportForUpgradedProject())
            {
                *isSupported = false;
            }
        }
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Rendering.GraphicsSettings o;
         o = new UnityEngine.Rendering.GraphicsSettings();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #3
0
        internal static unsafe void IsLightmapperSupportedByRef(int lightmapper, IntPtr isSupportedPtr)
        {
            var isSupported = (bool *)isSupportedPtr;

            // 0 = Enlighten
            // if the lightmapper is Enlighten but Enlighten is deprecated and the project isn't upgraded, it's not supported
            *isSupported = ((lightmapper == 0) && !active.enlighten && !GraphicsSettings.AllowEnlightenSupportForUpgradedProject()) ? false : true;
        }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.Rendering.GraphicsSettings o;
			o=new UnityEngine.Rendering.GraphicsSettings();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Rendering.GraphicsSettings o;
         o = new UnityEngine.Rendering.GraphicsSettings();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #6
0
 public static bool HasShaderDefine(BuiltinShaderDefine defineHash)
 {
     return(GraphicsSettings.HasShaderDefine(Graphics.activeTier, defineHash));
 }
Example #7
0
 public static bool HasShaderDefine(GraphicsTier tier, BuiltinShaderDefine defineHash)
 {
     return(GraphicsSettings.HasShaderDefineImpl(tier, defineHash));
 }