// Use this for initialization void Start() { fishObj = fish.gameObject; profile = ppVolume.profile; profile.TryGetSettings(out isoline); isoline.active = GlobalState.I.IsolineActive; profile.TryGetSettings(out warp); profile.TryGetSettings(out recolor); ToggleSkyBox(); ToggleSkyBox(); veda.SetActive(GlobalState.I.VedaEnabled); waveStick.gameObject.SetActive(GlobalState.I.WaveStickEnabled); emissionId = Shader.PropertyToID("_EmissionColor"); particles.SetActive(GlobalState.I.ParticlesEnabled); rayMarchingObject.SetActive(GlobalState.I.ObjectSpaceEnabled); worldSpaceMarch.SetActive(GlobalState.I.WorldSpaceEnabled); Debug.Log("displays connected: " + Display.displays.Length); // Display.displays[0] is the primary, default display and is always ON. // Check if additional displays are available and activate each. //if (Display.displays.Length > 1) // Display.displays[1].Activate(); if (Display.displays.Length > 2) { Display.displays[2].Activate(); } }
public void Awake() { m_Player = GetComponent <PlayerController>(); m_ScaleAmount = 0.3f; m_PostProfile.TryGetSettings(out m_EffectChromaticAberration); m_PostProfile.TryGetSettings(out m_EffectVignette); }
void Start() { TEXT.SetActive(false); PPV = GetComponent <PostProcessVolume>(); PPP = PPV.profile; PPP.TryGetSettings <Bloom>(out A); PPP.TryGetSettings <Grain>(out B); PPP.TryGetSettings <ChromaticAberration>(out C); }
private void Awake() { rotX = 1.75f; vCam = GetComponent <CinemachineVirtualCamera>(); cinemachineOrbitalTransposer = vCam.GetCinemachineComponent <CinemachineOrbitalTransposer>(); regularFieldOfView = vCam.m_Lens.FieldOfView; ppp.TryGetSettings(out motionBlur); ppp.TryGetSettings(out chromaticAberration); }
private void SetContrast(float intensity) { ColorGrading colorGrading; _postProcessProfile.TryGetSettings(out colorGrading); if (colorGrading) { colorGrading.contrast.value = intensity; } }
void Awake() { taikoModule = FindObjectOfType <TaikoModule>(); if (profile != null) { profile.TryGetSettings(out ca); if (ca != null) { ca.intensity.value = 0.0f; } } }
private void Awake() { sm = ServiceLocator.Current.Get <SettingsManager>(); AmbientOcclusion ssao; _postProcessProfile.TryGetSettings(out ssao); ssao.active = sm.Data.AmbientOcclusion; _postProcessLayer.antialiasingMode = sm.Data.AntiAliasing ? PostProcessLayer.Antialiasing.SubpixelMorphologicalAntialiasing : PostProcessLayer.Antialiasing.None; _auraCamera.enabled = sm.Data.VolumetricFog; sm.OnApplySettings += ApplySettings; }
private void Awake() { instance = this; PostProcessProfile i_postProcessVolumeProfile = Camera.main.GetComponent <PostProcessVolume>().profile; if (!i_postProcessVolumeProfile.TryGetSettings(out vignette)) { i_postProcessVolumeProfile.AddSettings <Vignette>(); } i_postProcessVolumeProfile.TryGetSettings(out vignette); vignette.color.value = vignetteColor; animator = GetComponent <Animator>(); gameObject.SetActive(false); }
void Start() { Rigidbody rb = GetComponent <Rigidbody>(); if (rb) { rb.freezeRotation = true; } originalRotation = transform.localRotation; if (FindObjectOfType <PostProcessVolume>()) { postProcessProfile = FindObjectOfType <PostProcessVolume>().profile; if (postProcessProfile != null) { postProcessProfile.TryGetSettings(out dof); } } chaseSpeed = camChaseSpeed; slowChaseSpeed = camChaseSpeed * 0.1f; fittingTargetDistance = distance; InitCamera(); SetOffset(bodyOffset); }
void SetDoF() { UsedProfile = ObjectProfile.Value as PostProcessProfile; UsedProfile.TryGetSettings(out DofLayer); if (ObjectProfile != null & UsedProfile.HasSettings <DepthOfField>()) { if (DofLayer != null) { DofLayer.active = ActiveLayer.Value; //Active AO Layer DofLayer.enabled.value = ActiveEffect.Value; // Active AO Effect DofLayer.focusDistance.overrideState = FocusDistanceActive.Value; //Activate Focus Distance if (FocusDistanceActive.Value) { DofLayer.focusDistance.value = FocusDistance.Value; // set distance value } DofLayer.aperture.overrideState = ApertureActive.Value; //Activate aperture if (ApertureActive.Value) { DofLayer.aperture.value = Aperture.Value; // set aperture value } DofLayer.focalLength.overrideState = FocalActive.Value; //Activate focal length if (FocalActive.Value) { DofLayer.focalLength.value = FocalLength.Value; // set focal value } DofLayer.kernelSize.overrideState = MaxBlurActive.Value; //Activate Max Blur Size if (MaxBlurActive.Value) { DofLayer.kernelSize.value = MaxBlur; // set Max Blur parameter } } } }
private void UpdateWetLensIntensity(float intensity) { #if UNITY_POST_PROCESSING_STACK_V2 if (PCommon.CurrentRenderPipeline == PRenderPipelineType.Builtin) { if (PostProcessProfile == null) { return; } PWetLens wetlensSettings; if (PostProcessProfile.TryGetSettings <PWetLens>(out wetlensSettings)) { wetlensSettings.intensity.Override(intensity); } } #endif #if POSEIDON_URP if (PCommon.CurrentRenderPipeline == PRenderPipelineType.Universal) { if (VolumeProfile == null) { return; } PWetLensOverride wetlensSettings; if (VolumeProfile.TryGet <PWetLensOverride>(out wetlensSettings)) { wetlensSettings.intensity.Override(intensity); } } #endif }
void Awake() { if (!postProcessingProfile.TryGetSettings <DepthOfField>(out dof)) //Try to get the setting override { dof = postProcessingProfile.AddSettings <DepthOfField>(); //Create one if it can't be found } }
void SetChromaticAberration() { UsedProfile = ObjectProfile.Value as PostProcessProfile; UsedProfile.TryGetSettings(out AberrationLayer); if (ObjectProfile != null & UsedProfile.HasSettings <ChromaticAberration>()) { if (AberrationLayer != null) { AberrationLayer.active = ActiveLayer.Value; //Active Chromatic Aberration Layer AberrationLayer.enabled.value = ActiveEffect.Value; // Active Chromatic Aberration Effect AberrationLayer.spectralLut.overrideState = LutTextureActive.Value; //Activate LUT Texture if (LutTextureActive.Value) { AberrationLayer.spectralLut.value = LutTexture.Value; // set LUT TExture } AberrationLayer.intensity.overrideState = IntensityActive.Value; //Activate intensity if (IntensityActive.Value) { AberrationLayer.intensity.value = Intensity.Value; // set intensity } AberrationLayer.fastMode.overrideState = FastModeActive.Value; //Activate Fast Mode if (FastModeActive.Value) { AberrationLayer.fastMode.value = FastMode.Value; // set Fast Mode } } } }
private IEnumerator LerpDash(Vector3 destination, Action reset) { Vector3 startPos = transform.position; destination = _destination; _collider.enabled = false; // disable the collider so the player doesn't take damage while they are dashing _postProcessProfile.TryGetSettings(out _chromaticAberration); // set the Chromatic Aberration to make the player feeling like they are moving fast _chromaticAberration.intensity.value = _distortionAmount; // Lerp the players position from the start position to the desitination while (curLerptime < _dashTime) { curLerptime += Time.deltaTime; if (curLerptime > _dashTime) { curLerptime = 0.0f; reset(); break; } float perc = curLerptime / _dashTime; // Vector3 dashPos = Vector3.Lerp(startPos, destination, perc); startPos = Vector3.Lerp(startPos, destination, perc); // transform.position = dashPos; transform.position = startPos; yield return(null); } AkSoundEngine.PostEvent(_stopTeleportSound, gameObject); StopCoroutine(LerpDash(_destination, Reset)); }
private void Start() { postProcessProfile.TryGetSettings(out depthOfField); DisableDepthOfField(); postProcessingMode = "On"; }
protected Vignette GetVignette(PostProcessProfile profile) { Vignette vignette; profile.TryGetSettings(out vignette); return(vignette); }
void Start() { _volume = GetComponent <PostProcessVolume>(); _profile = _volume.profile; _profile.TryGetSettings <DepthOfField>(out _depthOfField); }
void SetGrain() { UsedProfile = ObjectProfile.Value as PostProcessProfile; UsedProfile.TryGetSettings(out GrainLayer); if (ObjectProfile != null & UsedProfile.HasSettings <Grain>()) { if (GrainLayer != null) { GrainLayer.active = ActiveLayer.Value; //Active AO Layer GrainLayer.enabled.value = ActiveEffect.Value; // Active AO Effect GrainLayer.colored.overrideState = ColoredActive.Value; //Activate Mode if (ColoredActive.Value) { GrainLayer.colored.value = Colored.Value; // AO Mode selection } GrainLayer.intensity.overrideState = IntensityActive.Value; //Activate Mode if (IntensityActive.Value) { GrainLayer.intensity.value = Intensity.Value; // AO Mode selection } GrainLayer.size.overrideState = SizeActive.Value; //Activate Mode if (SizeActive.Value) { GrainLayer.size.value = Size.Value; // AO Mode selection } GrainLayer.lumContrib.overrideState = LuminanceContributionActive.Value; //Activate Mode if (LuminanceContributionActive.Value) { GrainLayer.lumContrib.value = LuminanceContribution.Value; // AO Mode selection } } } }
private void UpdateUnderwaterIntensity(float intensity) { #if UNITY_POST_PROCESSING_STACK_V2 if (PCommon.CurrentRenderPipeline == PRenderPipelineType.Builtin) { if (PostProcessProfile == null) { return; } PUnderwater underwaterSettings; if (PostProcessProfile.TryGetSettings <PUnderwater>(out underwaterSettings)) { underwaterSettings.intensity.Override(intensity); } } #endif #if POSEIDON_URP if (PCommon.CurrentRenderPipeline == PRenderPipelineType.Universal) { if (VolumeProfile == null) { return; } PUnderwaterOverride underwaterSettigns; if (VolumeProfile.TryGet <PUnderwaterOverride>(out underwaterSettigns)) { underwaterSettigns.intensity.Override(intensity); } } #endif }
/// <summary> /// Updates the underwater post fx /// </summary> private void UpdateUnderwaterPostFX() { if (m_supportPostFX) { #if UNITY_POST_PROCESSING_STACK_V2 if (m_postProcessProfile == null) { if (m_underwaterPostFX != null) { PostProcessVolume processVolume = m_underwaterPostFX.GetComponent <PostProcessVolume>(); if (processVolume != null) { m_postProcessProfile = processVolume.sharedProfile; } } } else { UnityEngine.Rendering.PostProcessing.ColorGrading colorGrading; #if GAIA_PRO_PRESENT if (!m_weatherSystemExists) { #endif if (m_postProcessProfile.TryGetSettings(out colorGrading)) { colorGrading.postExposure.value = m_constUnderwaterPostExposure; colorGrading.postExposure.overrideState = true; colorGrading.colorFilter.value = m_constUnderwaterColorFilter; colorGrading.colorFilter.overrideState = true; } #if GAIA_PRO_PRESENT } else { if (m_postProcessProfile.TryGetSettings(out colorGrading)) { colorGrading.postExposure.value = m_gradientUnderwaterPostExposure.Evaluate(GaiaGlobal.GetTimeOfDayMainValue()); colorGrading.postExposure.overrideState = true; colorGrading.colorFilter.value = m_gradientUnderwaterColorFilter.Evaluate(GaiaGlobal.GetTimeOfDayMainValue()); colorGrading.colorFilter.overrideState = true; } } #endif } #endif } }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <Bloom>(out bloom)) //Try to get the setting override { bloom = postProcessingProfile.AddSettings <Bloom>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <ScreenSpaceReflections>(out ssr)) //Try to get the setting override { ssr = postProcessingProfile.AddSettings <ScreenSpaceReflections>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <MotionBlur>(out mb)) //Try to get the setting override { mb = postProcessingProfile.AddSettings <MotionBlur>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <AmbientOcclusion>(out ao)) //Try to get the setting override { ao = postProcessingProfile.AddSettings <AmbientOcclusion>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <Vignette>(out vig)) //Try to get the setting override { vig = postProcessingProfile.AddSettings <Vignette>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <ChromaticAberration>(out ca)) //Try to get the setting override { ca = postProcessingProfile.AddSettings <ChromaticAberration>(); //Create one if it can't be found } base.Awake(); }
protected override void Awake() { if (!postProcessingProfile.TryGetSettings <T>(out setting)) //Try to get the setting { setting = postProcessingProfile.AddSettings <T>(); //Create it if it can't be found setting.SetAllOverridesTo(true); } base.Awake(); }
private void Start() { AmbientOcclusion ambientOcclusion; if (profile.TryGetSettings <AmbientOcclusion>(out ambientOcclusion)) { ambientOcclusion.active = true; } }
private void Start() { _sharedProfile = GetComponent <PostProcessVolume>().sharedProfile; if (!_sharedProfile.TryGetSettings(out _gradingEffect)) { return; } _originalExposure = _gradingEffect.postExposure; }
public override bool InitializeComponent(Orrb.RendererComponentConfig config) { // Find the post processing profile first. PostProcessProfile profile = FindPostprocessingProfile(); // Grab the settings we are interested in from this profile. profile.TryGetSettings(out color_grading_); profile.TryGetSettings(out bloom_); profile.TryGetSettings(out ambient_occlusion_); profile.TryGetSettings(out grain_); Debug.Assert(color_grading_ != null); Debug.Assert(bloom_ != null); Debug.Assert(ambient_occlusion_ != null); Debug.Assert(grain_ != null); return(base.InitializeComponent(config)); }