internal static unsafe bool IsMixedLightingModeSupported(MixedLightingMode mixedMode) { bool isSupported; IsMixedLightingModeSupportedByRef(mixedMode, new IntPtr(&isSupported)); return(isSupported); }
internal unsafe static bool IsMixedLightingModeSupported(MixedLightingMode mixedMode) { bool result; SupportedRenderingFeatures.IsMixedLightingModeSupportedByRef(mixedMode, new IntPtr((void *)(&result))); return(result); }
internal static bool IsMixedLightingModeSupported(MixedLightingMode mixedMode) { // this is done since the original enum doesn't allow flags due to it starting at 0, not 1 return((mixedMode == MixedLightingMode.IndirectOnly && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.IndirectOnly) == LightmapMixedBakeMode.IndirectOnly)) || (mixedMode == MixedLightingMode.Subtractive && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.Subtractive) == LightmapMixedBakeMode.Subtractive)) || (mixedMode == MixedLightingMode.Shadowmask && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.Shadowmask) == LightmapMixedBakeMode.Shadowmask))); }
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)); } }
internal unsafe static void IsMixedLightingModeSupportedByRef(MixedLightingMode mixedMode, IntPtr isSupportedPtr) { // if Mixed mode hasn't been turned off completely and the Mixed lights will be treated as Realtime bool *isSupported = (bool *)isSupportedPtr; if (!IsLightmapBakeTypeSupported(LightmapBakeType.Mixed)) { *isSupported = false; return; } // this is done since the original enum doesn't allow flags due to it starting at 0, not 1 *isSupported = ((mixedMode == MixedLightingMode.IndirectOnly && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.IndirectOnly) == LightmapMixedBakeMode.IndirectOnly)) || (mixedMode == MixedLightingMode.Subtractive && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.Subtractive) == LightmapMixedBakeMode.Subtractive)) || (mixedMode == MixedLightingMode.Shadowmask && ((SupportedRenderingFeatures.active.supportedMixedLightingModes & LightmapMixedBakeMode.Shadowmask) == LightmapMixedBakeMode.Shadowmask))); }
internal static bool IsMixedLightingModeSupported(MixedLightingMode mixedMode) { return((mixedMode == MixedLightingMode.IndirectOnly && (SupportedRenderingFeatures.active.supportedMixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeMode.IndirectOnly) == SupportedRenderingFeatures.LightmapMixedBakeMode.IndirectOnly) || (mixedMode == MixedLightingMode.Subtractive && (SupportedRenderingFeatures.active.supportedMixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive) == SupportedRenderingFeatures.LightmapMixedBakeMode.Subtractive) || (mixedMode == MixedLightingMode.Shadowmask && (SupportedRenderingFeatures.active.supportedMixedLightingModes & SupportedRenderingFeatures.LightmapMixedBakeMode.Shadowmask) == SupportedRenderingFeatures.LightmapMixedBakeMode.Shadowmask)); }
public void Save() { if (_ambientEquatorColor != RenderSettings.ambientEquatorColor) { _ambientEquatorColor = RenderSettings.ambientEquatorColor; } if (_ambientGroundColor != RenderSettings.ambientGroundColor) { _ambientGroundColor = RenderSettings.ambientGroundColor; } if (_ambientIntensity != RenderSettings.ambientIntensity) { _ambientIntensity = RenderSettings.ambientIntensity; } if (_subtractiveShadowColor != RenderSettings.subtractiveShadowColor) { _subtractiveShadowColor = RenderSettings.subtractiveShadowColor; } if (_ambientProbe != RenderSettings.ambientProbe) { _ambientProbe = RenderSettings.ambientProbe; } if (_ambientMode != RenderSettings.ambientMode) { _ambientMode = RenderSettings.ambientMode; } if (_ambientSkyColor != RenderSettings.ambientSkyColor) { _ambientSkyColor = RenderSettings.ambientSkyColor; } if (_defaultReflectionMode != RenderSettings.defaultReflectionMode) { _defaultReflectionMode = RenderSettings.defaultReflectionMode; } if (_defaultReflectionResolution != RenderSettings.defaultReflectionResolution) { _defaultReflectionResolution = RenderSettings.defaultReflectionResolution; } if (_reflectionBounces != RenderSettings.reflectionBounces) { _reflectionBounces = RenderSettings.reflectionBounces; } if (_reflectionIntensity != RenderSettings.reflectionIntensity) { _reflectionIntensity = RenderSettings.reflectionIntensity; } if (_aoExponentDirect != LightmapEditorSettings.aoExponentDirect) { _aoExponentDirect = LightmapEditorSettings.aoExponentDirect; } if (_aoExponentIndirect != LightmapEditorSettings.aoExponentIndirect) { _aoExponentIndirect = LightmapEditorSettings.aoExponentIndirect; } if (_aoMaxDistance != LightmapEditorSettings.aoMaxDistance) { _aoMaxDistance = LightmapEditorSettings.aoMaxDistance; } if (_bakeResolution != LightmapEditorSettings.bakeResolution) { _bakeResolution = LightmapEditorSettings.bakeResolution; } if (_enableAmbientOcclusion != LightmapEditorSettings.enableAmbientOcclusion) { _enableAmbientOcclusion = LightmapEditorSettings.enableAmbientOcclusion; } if (_maxAtlasSize != LightmapEditorSettings.maxAtlasSize) { _maxAtlasSize = LightmapEditorSettings.maxAtlasSize; } if (_padding != LightmapEditorSettings.padding) { _padding = LightmapEditorSettings.padding; } if (_realtimeResolution != LightmapEditorSettings.realtimeResolution) { _realtimeResolution = LightmapEditorSettings.realtimeResolution; } if (_reflectionCubemapCompression != LightmapEditorSettings.reflectionCubemapCompression) { _reflectionCubemapCompression = LightmapEditorSettings.reflectionCubemapCompression; } if (_textureCompression != LightmapEditorSettings.textureCompression) { _textureCompression = LightmapEditorSettings.textureCompression; } if (_bakedGI != Lightmapping.bakedGI) { _bakedGI = Lightmapping.bakedGI; } if (_bounceBoost != Lightmapping.bounceBoost) { _bounceBoost = Lightmapping.bounceBoost; } if (_giWorkflowMode != Lightmapping.giWorkflowMode) { _giWorkflowMode = Lightmapping.giWorkflowMode; } if (_indirectOutputScale != Lightmapping.indirectOutputScale) { _indirectOutputScale = Lightmapping.indirectOutputScale; } if (_realtimeGI != Lightmapping.realtimeGI) { _realtimeGI = Lightmapping.realtimeGI; } if (_lightmapsMode != LightmapSettings.lightmapsMode) { _lightmapsMode = LightmapSettings.lightmapsMode; } if (_mixedLightingMode != LightmapEditorSettings.mixedBakeMode) { _mixedLightingMode = LightmapEditorSettings.mixedBakeMode; } if (_directSamples != LightmapEditorSettings.directSampleCount) { _directSamples = LightmapEditorSettings.directSampleCount; } if (_indirectSamples != LightmapEditorSettings.indirectSampleCount) { _indirectSamples = LightmapEditorSettings.indirectSampleCount; } if (_environmentSamples != LightmapEditorSettings.environmentSampleCount) { _environmentSamples = LightmapEditorSettings.environmentSampleCount; } }