示例#1
0
        public static void GX_Presets_Sunset()
        {
            Aura mainComponent = SetupAura();

            mainComponent.frustum.settings.density       = 0.05f;
            mainComponent.frustum.settings.anisotropy    = 0.6f;
            mainComponent.frustum.settings.color         = Color.HSVToRGB(0.05f, 0.50f, 1);
            mainComponent.frustum.settings.colorStrength = 0.15f;

            AuraLight[] lights            = SetupLights();
            AuraLight[] directionalLights = SortOutLightsByType(lights, LightType.Directional);
            if (directionalLights.Length == 0)
            {
                directionalLights    = new AuraLight[1];
                directionalLights[0] = AuraLight.CreateGameObject("Aura Directional Light", LightType.Directional).GetComponent <AuraLight>();
            }
            for (int i = 0; i < directionalLights.Length; ++i)
            {
                Vector3 tmpRotation = directionalLights[i].transform.rotation.eulerAngles;
                tmpRotation.x = 10.0f;
                directionalLights[i].transform.rotation = Quaternion.Euler(tmpRotation);

                directionalLights[i].GetComponent <Light>().color     = Color.HSVToRGB(0.036f, 0.92f, 1.0f);
                directionalLights[i].GetComponent <Light>().intensity = 1.4f;

                directionalLights[i].strength = 1.0f;
                directionalLights[i].enableOutOfPhaseColor   = true;
                directionalLights[i].outOfPhaseColor         = Color.HSVToRGB(0.025f, 0.77f, 1);
                directionalLights[i].outOfPhaseColorStrength = 0.5f;
            }

            AuraVolume[] auraVolumes = GetVolumes();
            DisableActiveAuraVolumes(auraVolumes);
        }
        private static AuraLight[] SetupDirectionalLights()
        {
            AuraLight[] auraLights = Aura.AddAuraToDirectionalLights();
            if (auraLights.Length == 0)
            {
                auraLights    = new AuraLight[1];
                auraLights[0] = AuraLight.CreateGameObject("Aura Directional Light", LightType.Directional).GetComponent <AuraLight>();
            }

            return(auraLights);
        }
示例#3
0
        public static void GX_Presets_Dawn()
        {
            Aura mainComponent = SetupAura();

            mainComponent.frustum.settings.density       = 0.1f;
            mainComponent.frustum.settings.anisotropy    = 0.75f;
            mainComponent.frustum.settings.color         = Color.HSVToRGB(0.0777f, 0.50f, 1);
            mainComponent.frustum.settings.colorStrength = 0.25f;

            AuraLight[] lights            = SetupLights();
            AuraLight[] directionalLights = SortOutLightsByType(lights, LightType.Directional);
            if (directionalLights.Length == 0)
            {
                directionalLights    = new AuraLight[1];
                directionalLights[0] = AuraLight.CreateGameObject("Aura Directional Light", LightType.Directional).GetComponent <AuraLight>();
            }
            for (int i = 0; i < directionalLights.Length; ++i)
            {
                Vector3 tmpRotation = directionalLights[i].transform.rotation.eulerAngles;
                tmpRotation.x = 10.0f;
                directionalLights[i].transform.rotation = Quaternion.Euler(tmpRotation);

                directionalLights[i].GetComponent <Light>().color     = Color.HSVToRGB(0.0777f, 0.92f, 1.0f);
                directionalLights[i].GetComponent <Light>().intensity = 1.0f;

                directionalLights[i].strength = 1.0f;
                directionalLights[i].enableOutOfPhaseColor   = true;
                directionalLights[i].outOfPhaseColor         = Color.HSVToRGB(0.025f, 0.6f, 1);
                directionalLights[i].outOfPhaseColorStrength = 0.5f;
            }

            AuraVolume[] auraVolumes = GetVolumes();
            DisableActiveAuraVolumes(auraVolumes);
            AuraVolume globalVolume = AuraVolume.CreateGameObject("Aura Global Volume", VolumeTypeEnum.Global).GetComponent <AuraVolume>();

            globalVolume.noiseMask.enable                     = true;
            globalVolume.noiseMask.transform.scale            = Vector3.one * 5.0f;
            globalVolume.density.injectionParameters.enable   = true;
            globalVolume.density.injectionParameters.strength = 0.1f;
            globalVolume.density.injectionParameters.noiseMaskLevelParameters.contrast = 5.0f;
            globalVolume.color.injectionParameters.enable        = false;
            globalVolume.anisotropy.injectionParameters.enable   = true;
            globalVolume.anisotropy.injectionParameters.strength = 0.1f;
            globalVolume.anisotropy.injectionParameters.noiseMaskLevelParameters.contrast       = 3.0f;
            globalVolume.anisotropy.injectionParameters.noiseMaskLevelParameters.outputLowValue = -1.0f;
        }
示例#4
0
        private static AuraLight[] SetupLights()
        {
            Light[]     lights     = GameObject.FindObjectsOfType <Light>();
            AuraLight[] auraLights = new AuraLight[lights.Length];
            for (int i = 0; i < lights.Length; ++i)
            {
                AuraLight auraLight = lights[i].gameObject.GetComponent <AuraLight>();
                if (auraLight == null)
                {
                    auraLight = lights[i].gameObject.AddComponent <AuraLight>();
                }

                auraLights[i] = auraLight;
            }

            return(auraLights);
        }