void OnEnable() { m_Vignette = ScriptableObject.CreateInstance <Vignette>(); m_Vignette.enabled.Override(true); m_Vignette.intensity.Override(1f); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Vignette); }
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); }
public PowerUp_Flashbang(GameObject flashbangpanel) { this.canvas = flashbangpanel; name = "test"; powerUpList.Add(2, this); vin = Camera.main.GetComponent <PostProcessVolume>().profile.GetSetting <Vignette>(); }
static void Postfix(Vignette __instance) { if (Options.Opts.IsVignetteDisabled) { __instance.SetColor(__instance.defaultColor = Color.clear); } }
void OpenEyes(Vignette toOpen) { if (needOpen && !needClose && toOpen.intensity.value >= 0) { toOpen.intensity.value -= 0.7f * Time.deltaTime; } }
public void QuitToWorld() { AudioManager.GetInstance().PlaySound(Sound.MenuClick); Time.timeScale = 1; Vignette.LoadScene("WorldMap"); pauseMenu.SetActive(false); }
private void Awake() { _postVolume = GetComponent <PostProcessVolume>(); _postProfile = _postVolume.profile; _blind = _postProfile.GetSetting <Vignette>(); _noise = _postProfile.GetSetting <Grain>(); }
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 }
void Awake() { m_Vignette = postProcessProfile.GetSetting <Vignette>(); m_Vignette.intensity.value = 0; m_ChromaticAberation = postProcessProfile.GetSetting <ChromaticAberration>(); m_ChromaticAberation.intensity.value = 0; }
// Use this for initialization void Awake() { fadingIn = false; fadingOut = false; showingCard = false; leftToRight = false; endFadeAfterPan = false; fadeInAmount = 0; fadeOutAmount = 0; blackScreenOn = false; blackScreenTime = 0f; vignetteX = 0.5f; timedCard = false; m_Vignette = ScriptableObject.CreateInstance<Vignette>(); m_Vignette.enabled.Override(true); m_Vignette.roundness.Override(1f); m_Vignette.center.Override(new Vector2(0.5f, 0.5f)); m_Vignette.intensity.Override(0f); m_Vignette.smoothness.Override(0f); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Vignette); m_Volume.isGlobal = true; }
void Update() { if (Input.GetMouseButtonDown(0)) { m_Vignette = ScriptableObject.CreateInstance <Vignette>(); m_Vignette.enabled.Override(true); m_Vignette.intensity.Override(1f); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Vignette); vignette = true; } if (vignette == true) { m_Vignette.intensity.value = Mathf.Sin(Time.realtimeSinceStartup); } if (Input.GetMouseButtonDown(1)) { if (vignette == true) { OnDestroy(); vignette = false; print("thanks"); } } }
// Start is called before the first frame update void Start() { player_cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Camera>(); tm = GameObject.FindGameObjectWithTag("Timeline_Manager").GetComponent <Timeline_Manager>(); v = profile.GetSetting <Vignette>(); }
void OnEnable() { Debug.Log("Onset phase START"); m_Vignette = ScriptableObject.CreateInstance <Vignette>(); m_Vignette.enabled.Override(true); m_DepthOfField = ScriptableObject.CreateInstance <DepthOfField>(); m_DepthOfField.enabled.Override(true); m_Vignette.rounded.Override(VignetteRounded); m_Vignette.roundness.Override(VignetteRoundness); m_Vignette.smoothness.Override(VignetteSmoothness); m_Vignette.mode.Override(VignetteMode); m_Vignette.center.Override(VignetteCenter); m_Vignette.intensity.Override(VignetteIntensity); m_DepthOfField.focusDistance.Override(DoFFocusDistance); m_DepthOfField.kernelSize.Override(DoFKernelSize); m_DepthOfField.aperture.Override(DoFAperture); m_DepthOfField.focalLength.Override(DoFFocalLength); m_Volume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, m_Vignette, m_DepthOfField); }
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; } }
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; }
void Palpitations() { if (palLevel < 0) { palMode = true; } else if (palLevel > 0.2f) { palMode = false; } if (palMode == true) { palLevel += palSpeed; } else { palLevel -= palSpeed; } ChromaticAberration c = ScriptableObject.CreateInstance <ChromaticAberration>(); c.enabled.Override(true); c.intensity.Override(palLevel); Vignette v = ScriptableObject.CreateInstance <Vignette>(); v.color.Override(new Color(0.65f, 0.37f, 0.37f)); v.enabled.Override(true); v.intensity.Override(palLevel); PostProcessEffectSettings[] p = { c, v }; PostProcessVolume postProcessVolume = PostProcessManager.instance.QuickVolume(Camera.main.gameObject.layer, 0f, p); }
private void Awake() { if (volume.sharedProfile.TryGet(out Vignette vignette)) { this.vignette = vignette; } }
private void Start() { m_transform = transform; m_interactables = new List <Interactable>(); if (!m_headTransform) { m_headTransform = m_transform.Find("Camera"); } m_vrCam = m_headTransform.GetComponent <Camera>(); m_originalCamLayers = m_vrCam.cullingMask; if (!rHandTransform || !lHandTransform) { rHandTransform = m_transform.Find("Controller (right)"); lHandTransform = m_transform.Find("Controller (left)"); } if (oxygenUi) { m_oxygenIcon = oxygenUi.GetChild(0).GetComponent <Text>(); m_oxygenBar = oxygenUi.GetChild(1).GetComponent <Image>(); } if (powerUi) { m_powerIcon = powerUi.GetChild(0).GetComponent <Image>(); m_powerBar = powerUi.GetChild(1).GetComponent <Image>(); } m_vignette = m_postProfile.GetSetting <Vignette>(); }
private void Start() { ppVol = GetComponent <PostProcessVolume>(); vignette = ppVol.profile.settings[0] as Vignette; vignette.intensity.value = intensity; vignette.smoothness.value = this.smoothness; }
public void Activate() { // (Re)Set volume for post process vignette effect if (vignette != null) { vignette.intensity.value = 0f; Destroy(vignette); vignette = null; } vignette = ScriptableObject.CreateInstance <Vignette>(); vignette.enabled.Override(true); vignette.intensity.Override(0f); vignette.roundness.Override(1f); vignette.smoothness.Override(1f); volume = PostProcessManager.instance.QuickVolume(8, 100f, vignette); // (Re)Set cubeHasBeenHere cubeHasBeenHere = new Dictionary <MazeFrameSplines.SplineSegment, bool>(MazeFrameSplines.SplineSegments.Count); foreach (MazeFrameSplines.SplineSegment segment in MazeFrameSplines.SplineSegments) { cubeHasBeenHere.Add(segment, false); } // Reset some initials, as we need to guarantee initial behavior CurrSplineSegment = null; currEventHorizon = eventHorizon * MazeScale.ComponentMax(); // activate cubesActive = true; }
/// <summary> /// Processes the image. /// </summary> /// <param name="factory"> /// The the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class containing /// the image to process. /// </param> /// <param name="image">The current image to process</param> /// <param name="newImage">The new Image to return</param> /// <returns> /// The processed image from the current instance of the <see cref="T:ImageProcessor.ImageFactory"/> class. /// </returns> public Image TransformImage(ImageFactory factory, Image image, Image newImage) { using (Graphics graphics = Graphics.FromImage(newImage)) { using (ImageAttributes attributes = new ImageAttributes()) { attributes.SetColorMatrix(this.Matrix); Rectangle rectangle = new Rectangle(0, 0, image.Width, image.Height); graphics.DrawImage(image, rectangle, 0, 0, image.Width, image.Height, GraphicsUnit.Pixel, attributes); } } // Add a vignette to finish the effect. factory.Update(newImage); Vignette vignette = new Vignette(); newImage = (Bitmap)vignette.ProcessImage(factory); // Reassign the image. image.Dispose(); image = newImage; return(image); }
private void Start() { frequency = SlowmoManager.instance.frequency; destoryTime = SlowmoManager.instance.destoryTime; vignette = postVolume.profile.GetSetting <Vignette>(); }
void CloseEyes(Vignette toClose) { if (toClose.intensity.value < 10 && needClose && !needOpen) { toClose.intensity.value += 0.5f * Time.deltaTime; } }
private void Awake() { if (Instance == null) { Instance = this; } //init if (cameraShake.camera) { mainCamera = cameraShake.camera; } else { mainCamera = GetComponentInChildren <CinemachineVirtualCamera>(); } noise = mainCamera.GetCinemachineComponent <CinemachineBasicMultiChannelPerlin>(); radialBlurIsOpen = false; motionVectorIsOpen = false; PPP = GetComponent <PostProcessVolume>().sharedProfile; motionBlurSetting = PPP.GetSetting <MotionBlur>(); RadialBlurSetting = PPP.GetSetting <RadialBlur>(); HitEffectSetting = PPP.GetSetting <Vignette>(); }
public void LoadBattleScene(EnemyType enemyType, int enemyLevel, int enemyMaxPhase) { this.enemyType = enemyType; this.enemyLevel = enemyLevel; this.enemyMaxPhase = enemyMaxPhase; Vignette.LoadScene("Battle"); }
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); }
public void GenerateMap() { //Generates noise that will be applied to the mesh float[,] noise = Noise.NoiseMap(width, height, noiseScale, octaves, persistence, lacunarity, seed, islandMode, a, b); //Finds the displayer object and generates a mesh and texture for it to display. display = FindObjectOfType <LevelDisplayer>(); display.DrawMesh(MeshGenerator.GenerateMesh(noise, amplitude, meshHeightCurve, polygonAlignment), display.colorTexture(noise), flatShading); if (islandMode) { Color seaColor = new Color32(69, 91, 127, 255); Texture2D texture = new Texture2D(2, 2); Color[] colors = new Color[4]; for (int i = 0; i < 4; i++) { colors[i] = seaColor; } texture.filterMode = FilterMode.Point; texture.SetPixels(colors); texture.Apply(); MeshData[] surroundingMeshes = GenerateIslandSurroundings(); display.DrawSea(surroundingMeshes, texture, width - 1); } display.DrawArray(Vignette.GenerateEdges(width, a, b)); }
void Start() { if (GetComponent <ScriptManager>().ArmsCamera.GetComponent <PostProcessVolume>()) { postProcessing = GetComponent <ScriptManager>().ArmsCamera.GetComponent <PostProcessVolume>(); if (postProcessing.profile.HasSettings <ChromaticAberration>()) { chromatic = postProcessing.profile.GetSetting <ChromaticAberration>(); } else { Debug.LogError($"[PostProcessing] Please add Chromatic Aberration Effect to a {postProcessing.profile.name} profile in order to use Jumpscare Effects!"); } if (postProcessing.profile.HasSettings <Vignette>()) { vignette = postProcessing.profile.GetSetting <Vignette>(); } else { Debug.LogError($"[PostProcessing] Please add Vignette Effect to a {postProcessing.profile.name} profile in order to use Jumpscare Effects!"); } } else { Debug.LogError($"[PostProcessing] There is no PostProcessVolume script added to a {GetComponent<ScriptManager>().ArmsCamera.gameObject.name}!"); } itemSwitcher = GetComponentInChildren <ItemSwitcher>(); PlayerBreath = transform.root.gameObject.GetComponentInChildren <PlayerController>().transform.GetChild(1).transform.GetChild(1).gameObject.GetComponent <AudioSource>(); defaultVolume = PlayerBreath.volume; }
public HealthAndShieldPointsDisplayingSystem(Slider healthSlider, Text healthText, Slider shieldSlider, Text shieldText, Vignette vignette) { if (healthSlider == null) { throw new Exception($"{nameof(HealthPointsUpdaterSystem)} {nameof(healthSlider)} was null"); } if (healthText == null) { throw new Exception($"{nameof(HealthPointsUpdaterSystem)} {nameof(healthText)} was null"); } if (shieldSlider == null) { throw new Exception($"{nameof(HealthPointsUpdaterSystem)} {nameof(shieldSlider)} was null"); } if (shieldText == null) { throw new Exception($"{nameof(HealthPointsUpdaterSystem)} {nameof(shieldText)} was null"); } this.vignette = vignette; _healthSlider = healthSlider; _healthText = healthText; _shieldSlider = shieldSlider; _shieldText = shieldText; maxHealthPoints = vignetteStartValue; maxShieldPoints = 0f; healthPoints = 0f; shieldPoints = 0f; _shieldSlider.gameObject.SetActive(false); _healthSlider.transform.localPosition += deltaPosition; _healthSlider.transform.localScale = bigScale; vignette.intensity.value = 0f; vignette.enabled.value = true; }
private ChromaticAberration _chromAbr; // Chromatic Aberration // ----------------------------------------------------------------------------- // METHOD: Awake() // DESCRIPTION: Cache global variables, set up audio sources. Creates a // postProcessing volume with a vignette and chromatic abbration // which are used for extra feedback when player is hit/low on health // ------------------------------------------------------------------------------- private void Awake() { // Code to get player hurt audio sources: AudioSource[] sources = PlayerAudio.GetComponents <AudioSource>(); PlayerHurt = sources[0]; HeartBeatSource = sources[1]; BreathSource = sources[2]; _playerDeathMusic = sources[3]; _gainHealthAudio = sources[4]; _moveScript = GetComponent <MoveScript>(); _mouseLook = GetComponentInChildren <MouseLook>(); _playerAnim = GetComponentInChildren <Animator>(); LevelManager = FindObjectOfType <LevelManager>(); PlayerStats.PlayerHealth = 100.0f; // Make sure the player is beginning the game with full health // Added a conditional for the value assignment because there is no health slider in the start area scene if (_healthSlider) { _healthSlider.value = PlayerStats.PlayerHealth; } // Set up the post processing volume: _playerVignette = ScriptableObject.CreateInstance <Vignette>(); // create the vignette _playerVignette.enabled.Override(true); _playerVignette.intensity.Override(0.0f); _chromAbr = ScriptableObject.CreateInstance <ChromaticAberration>(); // Create and set up chromatic abb _chromAbr.enabled.Override(true); _chromAbr.intensity.Override(0.0f); _ppVolume = PostProcessManager.instance.QuickVolume(gameObject.layer, 100f, _playerVignette, _chromAbr); // assign the pp Volume }