private LightComponentCollectionGroup GetLightGroup(LightComponent light) { LightComponentCollectionGroup lightGroup; var directLight = light.Type as IDirectLight; var lightGroups = directLight != null && directLight.Shadow.Enabled && shadowMapRenderer != null ? activeLightGroupsWithShadows : activeLightGroups; var type = light.Type.GetType(); if (!lightGroups.TryGetValue(type, out lightGroup)) { lightGroup = new LightComponentCollectionGroup(); lightGroups.Add(type, lightGroup); } return lightGroup; }
public ActiveLightGroupRenderer(LightGroupRendererBase lightRenderer, LightComponentCollectionGroup lightGroup) { LightRenderer = lightRenderer; LightGroup = lightGroup; }
private LightComponentCollectionGroup GetLightGroup(RenderViewLightData renderViewData, LightComponent light) { LightComponentCollectionGroup lightGroup; var directLight = light.Type as IDirectLight; var lightGroups = renderViewData.ActiveLightGroups; var type = light.Type.GetType(); if (!lightGroups.TryGetValue(type, out lightGroup)) { lightGroup = new LightComponentCollectionGroup(type); lightGroups.Add(type, lightGroup); } return lightGroup; }