protected virtual void Start() { bloom = volume.profile.GetSetting <Bloom>(); chromaticAberration = volume.profile.GetSetting <ChromaticAberration>(); colorGrading = volume.profile.GetSetting <ColorGrading>(); vignette = volume.profile.GetSetting <Vignette>(); //Set Min values if (bloom) { minBloomIntensity = bloom.intensity.value; } if (vignette) { minVignetteIntensity = vignette.intensity.value; } if (chromaticAberration) { minChromaticIntensity = chromaticAberration.intensity.value; } if (colorGrading) { minPostExposure = colorGrading.postExposure.value; minSaturation = colorGrading.saturation.value; minContrast = colorGrading.contrast.value; startColorFilter = colorGrading.colorFilter.value; } }
void Start() { m_Vignette = ScriptableObject.CreateInstance <Vignette>(); m_Vignette.enabled.Override(true); m_Vignette.intensity.Override(0f); m_colour = ScriptableObject.CreateInstance <ColorGrading>(); m_colour.enabled.Override(true); m_colour.mixerBlueOutBlueIn.Override(150f); m_colour.mixerRedOutBlueIn.Override(0f); m_colour.mixerGreenOutBlueIn.Override(0f); m_colour.mixerBlueOutRedIn.Override(0f); m_colour.mixerRedOutRedIn.Override(150f); m_colour.mixerGreenOutRedIn.Override(0f); m_colour.mixerBlueOutGreenIn.Override(0f); m_colour.mixerRedOutGreenIn.Override(0f); m_colour.mixerGreenOutGreenIn.Override(150f); m_colour.saturation.Override(100f); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Vignette); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_colour); // recordBtn.SetActive(false); gifPreview.SetActive(false); uploadBtn.SetActive(false); }
private void Awake() { ppVol = GetComponent <PostProcessVolume>(); colorGradingDrunk = ppVol.profile.settings[2] as ColorGrading; hueShift = new FloatParameter(); audioSrc = GetComponent <AudioSource>(); }
//[Header("Player Damage Effect Properties")] //public float _playerDamageVignetteAmount; //public float _playerDamageContrastAmount; // Use this for initialization void Start() { //_postVignette = _postVolume. //_exposureFadeSpeed = .025f; _postVignette = ScriptableObject.CreateInstance <Vignette>(); _postVignette.enabled.Override(true); //_postVignette.intensity.Override(_vignetteStartValue); _postVignette.opacity.Override(_vignetteOpactityStartValue); //_postSettings _postColorGrading = ScriptableObject.CreateInstance <ColorGrading>(); _postColorGrading.enabled.Override(true); _postColorGrading.contrast.Override(_contrastStartValue); _postColorGrading.postExposure.Override(_exposureStartValue); //_postColorGrading.mixerGreenOutRedIn.Override(_redStartValue); //_postDOF = ScriptableObject.CreateInstance<DepthOfField>(); //_postDOF.enabled.Override(true); //_postDOF.focalLength.Override(_focalLengthStartValue); //_postDOF.focusDistance.Override(_focusDisatnceStartValue); _postVolume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, _postVignette, _postColorGrading);//, _postDOF); }
void OnEnable() { Debug.Log("Psychedelic phase START"); depthOfField = ScriptableObject.CreateInstance <DepthOfField>(); colorGrading = ScriptableObject.CreateInstance <ColorGrading>(); bloom = ScriptableObject.CreateInstance <Bloom>(); depthOfField.enabled.Override(true); colorGrading.enabled.Override(true); bloom.enabled.Override(true); colorGrading.tint.Override(ColorGradingTint); colorGrading.hueShift.Override(ColorGradingHueShift); colorGrading.saturation.Override(ColorGradingSaturation); colorGrading.postExposure.Override(ColorGradingPostExposure); bloom.intensity.Override(BloomIntensity); bloom.softKnee.Override(BloomSoftKnee); bloom.dirtTexture.Override(BloomTexture); bloom.dirtIntensity.Override(BloomDirtIntensity); bloom.clamp.Override(BloomClamp); bloom.diffusion.Override(BloomDiffusion); bloom.anamorphicRatio.Override(BloomAnamorphicRatio); depthOfField.focusDistance.Override(DoFFocusDistance); depthOfField.kernelSize.Override(DoFKernelSize); depthOfField.aperture.Override(DoFAperture); depthOfField.focalLength.Override(DoFFocalLength); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, depthOfField, bloom, colorGrading); }
private void DrawColorGradingConvertButton() { GUILayout.Space(5); if (GUILayout.Button("Convert") == false) { return; } if (inputLUT == null) { messageType = MessageType.Error; helpBoxMessage = "Please supply an input lookup texture"; return; } TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(inputPath); Texture2D converted = ColorGrading.Convert(inputLUT, compatibilityMode, importer.linearTexture); //Remove file extension and add "_Scion.png" string newPath = inputPath.Substring(0, inputPath.LastIndexOf(".")) + "_Scion.png"; SaveLookupTexture(newPath, converted); helpBoxMessage = "Saved converted lookup texture: " + newPath; messageType = MessageType.Info; Debug.Log(helpBoxMessage); }
private void Start() { //assign the specific post process variables to the post process profile settings postProcessColor = gamePostProcess.GetSetting <ColorGrading>(); postProcessGrain = gamePostProcess.GetSetting <Grain>(); postProcessVignette = gamePostProcess.GetSetting <Vignette>(); }
private IEnumerator TrippingCoroutine() { ColorGrading colorGrading = PostProcessing.CurrentFilter.GetSetting <ColorGrading>(); colorGrading.enabled.Override(true); while (true) { for (int i = 0; i < 101; i++) { if (PostProcessing.CurrentFilter != null) { FloatParameter newValue = new FloatParameter(); newValue.value = i; colorGrading.temperature.Override(newValue); } yield return(null); } for (int i = -100; i < 1; i++) { if (PostProcessing.CurrentFilter != null) { FloatParameter newValue = new FloatParameter(); newValue.value = i; colorGrading.temperature.Override(newValue); } yield return(null); } } }
void Awake() { healthManager = Player.GetComponent <HealthManager>(); scriptManager = Player.gameObject.GetComponentInChildren <ScriptManager>(); if (scriptManager.ArmsCamera.GetComponent <PostProcessVolume>()) { postProcessing = scriptManager.ArmsCamera.GetComponent <PostProcessVolume>(); if (postProcessing.profile.HasSettings <ColorGrading>()) { colorGrading = postProcessing.profile.GetSetting <ColorGrading>(); } else if (useGreyscale) { Debug.LogError($"[PostProcessing] Please add ColorGrading Effect to a {postProcessing.profile.name} profile in order to use Greyscale."); } } else { Debug.LogError($"[PostProcessing] There is no PostProcessVolume script added to a {ScriptManager.Instance.ArmsCamera.gameObject.name}!"); } lightSlider = LightPercentagle.GetComponentInChildren <Slider>(); lightBackground = lightSlider.transform.GetChild(0).GetComponent <Image>(); defaultIcon = LightPercentagle.transform.GetChild(0).GetComponent <Image>().sprite; configHandler = GetComponent <ConfigHandler>(); saveHandler = GetComponent <SaveGameHandler>(); inputManager = GetComponent <InputController>(); inventoryScript = GetComponent <Inventory>(); uiInteractive = true; }
public int GrayscaleRange = 0; //Targeted reset for Grayscaling (-100 Gray, 0 Normal, 100 Super Saturated) void Start() { #region Vignette Init Vig = ScriptableObject.CreateInstance <Vignette>(); Vig.enabled.Override(true); Vig.intensity.Override(.45f); #endregion #region ColorGrading Init ColorG = ScriptableObject.CreateInstance <ColorGrading>(); ColorG.enabled.Override(true); if (GrayScale) { ColorG.saturation.Override(-100f); } ColorG.postExposure.overrideState = true; #endregion #region DepthOfField Init DOF = ScriptableObject.CreateInstance <DepthOfField>(); DOF.enabled.Override(true); DOF.focusDistance.Override(5f); #endregion #region MotionBlur Init Blur = ScriptableObject.CreateInstance <MotionBlur>(); Blur.enabled.Override(true); #endregion #region Volume Init Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, Vig, ColorG, DOF, Blur); #endregion }
// Token: 0x06000C11 RID: 3089 RVA: 0x0004BCD8 File Offset: 0x00049ED8 private void ApplyBrightnessSetting() { ColorGrading colorGrading = null; this.postProcessingVolume.profile.TryGetSettings <ColorGrading>(out colorGrading); colorGrading.postExposure.value = PlayerPrefs.GetFloat("brightnessValue"); }
private void Start() { //Finds PostProcessing layer to apply effect. //Must have PostProcessing layer added in order for effect to work properly. layerIndex = LayerMask.NameToLayer("PostProcessing"); camera.GetComponent <PostProcessLayer>().volumeLayer = LayerMask.GetMask("PostProcessing"); //Creates vignette effect and sets default settings. vignette = ScriptableObject.CreateInstance <Vignette>(); vignette.enabled.Override(false); vignette.intensity.Override(0f); //Creates color grading effect and sets default settings. colorGrading = ScriptableObject.CreateInstance <ColorGrading>(); colorGrading.enabled.Override(false); //Gets settings to use from effect profile provided. vColor = postProfile.GetSetting <Vignette>().color; vCenter = postProfile.GetSetting <Vignette>().center; vSmoothness = postProfile.GetSetting <Vignette>().smoothness; vRoundness = postProfile.GetSetting <Vignette>().roundness; vRounded = postProfile.GetSetting <Vignette>().rounded; //Sets settings to approprate values. vignette.color.Override(vColor); vignette.center.Override(vCenter); vignette.smoothness.Override(vSmoothness); vignette.roundness.Override(vRoundness); vignette.rounded.Override(vRounded); //Creates volume for effect to be applied. volume = PostProcessManager.instance.QuickVolume(layerIndex, 0, vignette, colorGrading); volume.isGlobal = true; }
public void AfterTest() { _fader = null; _otherVolumeColorGrading = null; _volumeColorGrading = null; }
void Start() { #region BlurVision BlurOfVision = ScriptableObject.CreateInstance <DepthOfField>(); BlurOfVision.enabled.Override(true); BlurOfVision.focusDistance.overrideState = true; #endregion #region LensD LensD = ScriptableObject.CreateInstance <LensDistortion>(); LensD.enabled.Override(true); LensD.intensity.overrideState = true; #endregion #region ColorG ColorG = ScriptableObject.CreateInstance <ColorGrading>(); ColorG.enabled.Override(true); ColorG.saturation.overrideState = true; #endregion #region TVig TVig = ScriptableObject.CreateInstance <Vignette>(); TVig.enabled.Override(true); TVig.intensity.overrideState = true; #endregion Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, BlurOfVision, LensD, ColorG, TVig); }
void Start() { m_colorGrading = ScriptableObject.CreateInstance <ColorGrading>(); m_colorGrading.enabled.Override(true); m_colorGrading.brightness.Override(0f); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 1, m_colorGrading); }
private void Start() { cg = ScriptableObject.CreateInstance <ColorGrading>(); cg.enabled.Override(true); //cg.saturation.Override(-100f); volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, cg); }
void Awake() { m_color_grading = ScriptableObject.CreateInstance <ColorGrading>(); m_vignette = ScriptableObject.CreateInstance <Vignette>(); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_color_grading); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_vignette); }
void Start() { colorGrading = GameManager.Instance.GetComponent <PostProcessVolume>().profile.GetSetting <ColorGrading>(); colorGrading.brightness.value = -100; //GameManager.Player.GetComponent<PlayerController>().hasControl = false; GameManager.GameTimer.StartTimer(); StartCoroutine(Intro()); }
private void ReloadCamera() { _camera = Camera.main; _volume = _camera.GetComponent <PostProcessVolume>(); _shaderColorGrading = _volume.profile.GetSetting <ColorGrading>(); _shaderDepthOfField = _volume.profile.GetSetting <DepthOfField>(); _shaderChromaticAberration = _volume.profile.GetSetting <ChromaticAberration>(); }
void Start() { Oclussion = Volume.profile.GetSetting <AmbientOcclusion>(); Grading = Volume.profile.GetSetting <ColorGrading>(); PlayerManager.NormalOclussion += (sender, args) => NormalOclussion(); PlayerManager.OrangeOclussion += (sender, args) => OrangeOclussion(); }
public ColorGradeEntry(ColorGrading inColorGrading, float inDefaultPostExposure) { CurrentStartPostExposure = inColorGrading.postExposure.value; CurrentFinalPostExposure = 0.0f; ColorGrade = inColorGrading; DefaultPostExposure = inDefaultPostExposure; }
private void Awake() { matchTimer = GameObject.FindGameObjectWithTag("MatchTimer").GetComponent <MatchTimer>(); emissionBar = GameObject.FindGameObjectWithTag("EmissionsBar").GetComponent <ProgressBar>(); populationBar = GameObject.FindGameObjectWithTag("PopulationBar").GetComponent <ProgressBar>(); ppv = GameObject.FindGameObjectWithTag("PostProcessGlobal").GetComponent <PostProcessVolume>(); colorGrade = ppv.profile.GetSetting <ColorGrading>(); saveGame = GetComponent <SaveGame>(); }
void Awake() { gameController = GameController.Instance; colorGrading = (ColorGrading)postProcess.profile.settings.Find(x => x.GetType() == typeof(ColorGrading)); vignette = (Vignette)postProcess.profile.settings.Find(x => x.GetType() == typeof(Vignette)); grain = (Grain)postProcess.profile.settings.Find(x => x.GetType() == typeof(Grain)); gameController.player.Stats.StatChanged += OnPlayerStatChanged; }
void Start() { p_colorGrading = ScriptableObject.CreateInstance <ColorGrading>(); p_colorGrading.enabled.Override(true); p_colorGrading.hueShift.Override(hueShiftValue); p_colorGrading.saturation.Override(saturationValue); p_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, p_colorGrading); questPerson = GameObject.Find("QuestPerson"); happynesCompareValue = PlayerInfo.PlayerMood; }
// Start is called before the first frame update void Start() { player_cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); default_fov = player_cam.fieldOfView; ca = profile.GetSetting <ChromaticAberration>(); ld = profile.GetSetting <LensDistortion>(); cg = profile.GetSetting <ColorGrading>(); }
void PP() { ColorGrading colorGradingLayer = null; // somewhere during initializing PostProcessVolume volume = gameObject.GetComponent <PostProcessVolume>(); volume.profile.TryGetSettings(out colorGradingLayer); colorGradingLayer.colorFilter.value = Color.Lerp(Color.black, Color.white, Mathf.Clamp(Time.time * 0.2f, 0.0f, 1.0f)); }
void Start() { volume = GetComponent <PostProcessVolume>(); colorGrading = ScriptableObject.CreateInstance <ColorGrading>(); colorGrading.enabled.Override(true); colorGrading.saturation.Override(0f); volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, colorGrading); saturation = 0f; }
// Start is called before the first frame update void Start() { _LD = PPV.profile.GetSetting <LensDistortion>(); _VIG = PPV.profile.GetSetting <Vignette>(); _CG = PPV.profile.GetSetting <ColorGrading>(); SetDistortionLevel(0); Instance = this; }
internal void InitializeProfiles() { if (!SettingValues.profile.TryGetSettings(out chromaticAberrationLayer)) { chromaticAberrationLayer = SettingValues.profile.AddSettings <ChromaticAberration>(); } if (!SettingValues.profile.TryGetSettings(out grainLayer)) { grainLayer = SettingValues.profile.AddSettings <Grain>(); } if (!SettingValues.profile.TryGetSettings(out ambientOcclusionLayer)) { ambientOcclusionLayer = SettingValues.profile.AddSettings <AmbientOcclusion>(); } if (!SettingValues.profile.TryGetSettings(out autoExposureLayer)) { autoExposureLayer = SettingValues.profile.AddSettings <AutoExposure>(); } if (!SettingValues.profile.TryGetSettings(out bloomLayer)) { bloomLayer = SettingValues.profile.AddSettings <Bloom>(); } if (!SettingValues.profile.TryGetSettings(out colorGradingLayer)) { colorGradingLayer = SettingValues.profile.AddSettings <ColorGrading>(); } if (!SettingValues.profile.TryGetSettings(out depthOfFieldLayer)) { depthOfFieldLayer = SettingValues.profile.AddSettings <DepthOfField>(); } if (!SettingValues.profile.TryGetSettings(out screenSpaceReflectionsLayer)) { screenSpaceReflectionsLayer = SettingValues.profile.AddSettings <ScreenSpaceReflections>(); } if (!SettingValues.profile.TryGetSettings(out vignetteLayer)) { vignetteLayer = SettingValues.profile.AddSettings <Vignette>(); } if (!SettingValues.profile.TryGetSettings(out motionBlurLayer)) { motionBlurLayer = SettingValues.profile.AddSettings <MotionBlur>(); motionBlurLayer.enabled.value = false; } depthOfFieldLayer.enabled.value = false; // Make people use Depth of Field Manually }
IEnumerator Desaturate() { ColorGrading colorGradingLayer = null; volume.profile.TryGetSettings(out colorGradingLayer); while (true) { colorGradingLayer.saturation.value = Mathf.Lerp(colorGradingLayer.saturation.value, -100.0f, 10.0f * Time.unscaledDeltaTime); yield return(new WaitForEndOfFrame()); } }