private static bool IsRealtimeGI(ref LightModeValidator.Stats stats) { return(stats.realtimeMode == 0); }
internal static void AnalyzeScene(int realtimeMode, int mixedMode, int bakedMode, int ambientMode, ref LightModeValidator.Stats stats) { stats.Reset(); stats.realtimeMode = realtimeMode; stats.mixedMode = mixedMode; stats.bakedMode = bakedMode; stats.ambientMode = ambientMode; LightmapEditorSettings.AnalyzeLighting(out stats.enabled, out stats.active, out stats.inactive); stats.emitterMask = LightModeValidator.Emitters.None; stats.emitterMask |= ((stats.enabled.realtimeLightsCount <= 0u) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.RealtimeLight); stats.emitterMask |= ((stats.enabled.staticMeshesRealtimeEmissive <= 0u) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.RealtimeEmissive); stats.emitterMask |= ((!LightModeValidator.IsAmbientRealtime(ref stats)) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.RealtimeAmbient); stats.emitterMask |= ((stats.enabled.bakedLightsCount <= 0u) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.BakedLight); stats.emitterMask |= ((stats.enabled.staticMeshesBakedEmissive <= 0u) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.BakedEmissive); stats.emitterMask |= ((!LightModeValidator.IsAmbientBaked(ref stats)) ? LightModeValidator.Emitters.None : LightModeValidator.Emitters.BakedAmbient); stats.receiverMask = LightModeValidator.Receivers.None; stats.receiverMask |= ((stats.enabled.lightProbeGroupsCount <= 0u) ? LightModeValidator.Receivers.None : LightModeValidator.Receivers.LightProbe); stats.receiverMask |= ((stats.enabled.staticMeshesCount <= 0u) ? LightModeValidator.Receivers.None : LightModeValidator.Receivers.StaticMesh); if (stats.receiverMask == LightModeValidator.Receivers.None) { stats.requiresRealtimeGI = false; stats.requiresLightmaps = false; } else { stats.requiresRealtimeGI = LightModeValidator.IsRealtimeGI(ref stats); stats.requiresLightmaps = ((stats.emitterMask & LightModeValidator.Emitters.Baked) != LightModeValidator.Emitters.None); } }
private static bool IsAmbientRealtime(ref LightModeValidator.Stats stats) { return(stats.ambientMode == 0); }
private static bool IsAmbientBaked(ref LightModeValidator.Stats stats) { return(stats.ambientMode == 1); }
public void AnalyzeScene(ref LightModeValidator.Stats stats) { LightModeValidator.AnalyzeScene(this.m_modeVals[0], this.m_modeVals[1], this.m_modeVals[2], this.GetAmbientLightingMode(), ref stats); }