Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
 public ActiveLightGroupRenderer(LightGroupRendererBase lightRenderer, LightComponentCollectionGroup lightGroup)
 {
     LightRenderer = lightRenderer;
     LightGroup    = lightGroup;
 }