/// <summary> /// Register an AuraLights to be taken into account /// </summary> /// <param name="light">The candidate light</param> /// <returns>True if registration went well, false otherwise</returns> public bool Register(AuraLight light, bool castShadows, bool castCookie) { if (light.Type == LightType.Directional && !_lights.Contains(light)) { _lights.Add(light); SetupBuffers(); if (castShadows) { _shadowmapsCollector.AddTexture(light.shadowMapRenderTexture); _shadowDataCollector.AddTexture(light.shadowDataRenderTexture); } if (castCookie) { _cookieMapsCollector.AddTexture(light.cookieMapRenderTexture); } return(true); } return(false); }
/// <summary> /// Register an AuraLights to be taken into account /// </summary> /// <param name="light">The candidate light</param> /// <returns>True if registration went well, false otherwise</returns> public bool Register(AuraLight light, bool castShadows, bool castCookie) { if (light.Type == LightType.Spot && !_lights.Contains(light)) { _culler.Register(light); _lights.Add(light); if (castShadows) { _shadowmapsCollector.AddTexture(light.shadowMapRenderTexture); } if (castCookie) { _cookieMapsCollector.AddTexture(light.cookieMapRenderTexture); } return(true); } return(false); }