private void UpdateBloom() { try { UnityStandardAssets.ImageEffects.Bloom vanillaBloom = _camera.gameObject.GetComponent <UnityStandardAssets.ImageEffects.Bloom>(); BloomModel.Settings settings = _bloomModel.settings; if (ModProperties.Instance.ActiveProfile.BloomEnabled) { vanillaBloom.enabled = ModProperties.Instance.ActiveProfile.BloomVanillaBloomEnabled; settings.bloom.intensity = ModProperties.Instance.ActiveProfile.BloomIntensity; settings.bloom.threshold = ModProperties.Instance.ActiveProfile.BloomThreshold; settings.bloom.softKnee = ModProperties.Instance.ActiveProfile.BloomSoftKnee; settings.bloom.radius = ModProperties.Instance.ActiveProfile.BloomRadius; settings.bloom.antiFlicker = ModProperties.Instance.ActiveProfile.BloomAntiFlicker; _bloomModel.settings = settings; _bloomModel.enabled = true; } else { vanillaBloom.enabled = true; _bloomModel.enabled = false; } _postProcessingBehaviour.profile.bloom.settings = _bloomModel.settings; _postProcessingBehaviour.profile.bloom.enabled = _bloomModel.enabled; } catch (Exception e) { Debug.Log("[Render It!] ModManager:UpdateBloom -> Exception: " + e.Message); } }
void PreparePostProcess() { postProcess.profile.colorGrading.enabled = false; VignetteModel.Settings vignet = postProcess.profile.vignette.settings; vignet.center = new Vector2(0.5f, 0.5f); vignet.intensity = 0.45f; vignet.smoothness = 0.3f; vignet.color = Color.black; BloomModel.Settings bloomSettings = postProcess.profile.bloom.settings; bloomSettings.bloom.intensity = 1f; bloomSettings.bloom.radius = 6.06f; bloomSettings.bloom.softKnee = 0.654f; postProcess.profile.vignette.settings = vignet; postProcess.profile.bloom.settings = bloomSettings; //VERY QUESTIONABLE CHANGE BUT WHAT CAN YOU DO if (QualitySettings.pixelLightCount < optimalPixelLightAmount) { QualitySettings.pixelLightCount = optimalPixelLightAmount; } }
private void Start() { ppProfile = gameObject.GetComponent <PostProcessingBehaviour>().profile; blSettings = ppProfile.bloom.settings; blSettings.bloom.intensity = 0f; ppProfile.bloom.settings = blSettings; }
// Update is called once per frame void Update() { BloomModel.Settings bloomSettings = ppProfile.bloom.settings; //Timer for bloom Lerp if (isFadeingIn) { timer += Time.deltaTime; if (timer >= 1) { timer = 1; isFadeingIn = false; } } else { timer -= Time.deltaTime; if (timer <= 0) { timer = 0; isFadeingIn = true; } } //Adjusting bloom values bloomSettings.bloom.intensity = Mathf.Lerp(MinBloom, MaxBloom, timer); ppProfile.bloom.settings = bloomSettings; }
void Start() { behaviour = Camera.main.GetComponent <PostProcessingBehaviour>(); settings = behaviour.profile.bloom.settings; settings.bloom.intensity = nomalIntensity; behaviour.profile.bloom.settings = settings; }
void Start() { // emJogo = true; vidas = 3; timeFim = 0.0f; larguraBt = 150; alturaBt = 100; if (SceneManager.GetActiveScene().name == "Fase1") { txtVidas.text = vidas.ToString(); } if (SceneManager.GetActiveScene().name != "TelaInicial" && SceneManager.GetActiveScene().name != "GameOver") { //PowerUps// blurProfile = perfil.depthOfField.settings; blurProfile.kernelSize = DepthOfFieldModel.KernelSize.VeryLarge; blurProfile.aperture = 32; blurProfile.focalLength = 0.1f; blurTimer = 0f; perfil.depthOfField.settings = blurProfile; bloomProfile = perfil.bloom.settings; bloomProfile.bloom.threshold = 1f; } }
protected void LerpBloom(float rate) { float BLOOM_ACTIVATION_LIMIT = 0.05f; transitionProfile.bloom.enabled = EnableOrDisableEffect(oldProfile.bloom.enabled, futureProfile.bloom.enabled, rate, BLOOM_ACTIVATION_LIMIT); BloomModel.Settings settings = oldProfile.bloom.settings; // Bloom BloomModel.BloomSettings currentBloom = settings.bloom; BloomModel.BloomSettings futureBloom = futureProfile.bloom.settings.bloom; currentBloom.intensity = Mathf.Lerp(currentBloom.intensity, futureBloom.intensity, rate); currentBloom.threshold = Mathf.Lerp(currentBloom.threshold, futureBloom.threshold, rate); currentBloom.softKnee = Mathf.Lerp(currentBloom.softKnee, futureBloom.softKnee, rate); currentBloom.radius = Mathf.Lerp(currentBloom.radius, futureBloom.radius, rate); // currentSettings.antiFlicker = ; settings.bloom = currentBloom; // Lens Dirt BloomModel.LensDirtSettings currentLensDirt = settings.lensDirt; // currentLensDirt.texture = ; currentLensDirt.intensity = Mathf.Lerp(currentLensDirt.intensity, futureProfile.bloom.settings.lensDirt.intensity, rate); settings.lensDirt = currentLensDirt; transitionProfile.bloom.settings = settings; }
void Start() { // 해상도 비율 고정 Screen.SetResolution(Screen.width, (Screen.width * 9) / 16, Screen.fullScreen); // 핸드폰 꺼짐 방지 Screen.sleepTimeout = SleepTimeout.NeverSleep; player = GameObject.Find("Player"); playerMove = player.GetComponent<HO_PlayerMove>(); camManager = GameObject.Find("CameraManager").GetComponent<HO_CameraManager>(); post = Camera.main.GetComponent<PostProcessingBehaviour>(); setting = post.profile.bloom.settings; audioManager = GameObject.Find("AudioManager").GetComponent<AudioManager>(); // "Slide To Move" 문구 이후 사용자 터치 유도 이미지 표시를 위한 오브젝트 가져오기 playerRound = player.transform.Find("Canvas").gameObject; playerRoundImg = playerRound.transform.GetChild(0).GetComponent<Image>(); // - 알파값 제로 Color c = playerRoundImg.color; c.a = 0; playerRoundImg.color = c; // 시작은 home에서! HomeProcess(); }
public void run(bool isPlayer1) { player1 = GameObject.Find("Player 1"); player2 = GameObject.Find("Player 2"); p1PPP = GameObject.Find("CameraJoueur1").GetComponent <PostProcessingBehaviour>().profile; p2PPP = GameObject.Find("CameraJoueur2").GetComponent <PostProcessingBehaviour>().profile; //BloomModel.Settings bloomTempSet; //= p1.bloom.settings; //bloomTempSet.bloom.intensity = 45.0f; //p1PPP.bloom.settings = bloomTempSet; bool player1First = false; float positionPlayer1 = player1.transform.position.x; float positionPlayer2 = player2.transform.position.x; if (positionPlayer1 > positionPlayer2) { player1First = true; } if (isPlayer1 && player1First) { flouTimer = 3.5f; isPlayer1Cible = false; } else if (isPlayer1 && !player1First) { flouTimer = 7.0f; isPlayer1Cible = false; } if (!isPlayer1 && !player1First) { flouTimer = 3.5f; isPlayer1Cible = true; } if (!isPlayer1 && player1First) { flouTimer = 7.0f; isPlayer1Cible = true; } if (isPlayer1Cible) { BloomModel.Settings bloomTempSet = p1PPP.bloom.settings; bloomTempSet.bloom.intensity = 45.0f; p1PPP.bloom.settings = bloomTempSet; StartCoroutine(Timer(flouTimer, isPlayer1Cible)); } else { BloomModel.Settings bloomTempSet = p2PPP.bloom.settings; bloomTempSet.bloom.intensity = 45.0f; p2PPP.bloom.settings = bloomTempSet; StartCoroutine(Timer(flouTimer, isPlayer1Cible)); } }
public void UpdateLighting() { Vector3 SunDIr = new Vector3(-map.SunDirection.x, -map.SunDirection.y, map.SunDirection.z); Sun.transform.rotation = Quaternion.LookRotation(SunDIr); Sun.color = new Color(map.SunColor.x, map.SunColor.y, map.SunColor.z, 1); Sun.intensity = map.LightingMultiplier * EditMap.LightingInfo.SunMultipiler; RenderSettings.ambientLight = new Color(map.ShadowFillColor.x, map.ShadowFillColor.y, map.ShadowFillColor.z, 1); BloomModel.Settings Bs = PostProcessing.bloom.settings; Bs.bloom.intensity = map.Bloom * 10; PostProcessing.bloom.settings = Bs; BloomOpt.intensity = map.Bloom * 4; BloomOptPreview.intensity = map.Bloom * 4; RenderSettings.fogColor = new Color(map.FogColor.x, map.FogColor.y, map.FogColor.z, 1); RenderSettings.fogStartDistance = map.FogStart * 4f; RenderSettings.fogEndDistance = map.FogEnd * 4f; Shader.SetGlobalFloat("_LightingMultiplier", map.LightingMultiplier); Shader.SetGlobalColor("_SunColor", new Color(map.SunColor.x * 0.5f, map.SunColor.y * 0.5f, map.SunColor.z * 0.5f, 1)); Shader.SetGlobalColor("_SunAmbience", new Color(map.SunAmbience.x * 0.5f, map.SunAmbience.y * 0.5f, map.SunAmbience.z * 0.5f, 1)); Shader.SetGlobalColor("_ShadowColor", new Color(map.ShadowFillColor.x * 0.5f, map.ShadowFillColor.y * 0.5f, map.ShadowFillColor.z * 0.5f, 1)); Shader.SetGlobalColor("_SpecularColor", new Color(map.SpecularColor.x * 0.5f, map.SpecularColor.y * 0.5f, map.SpecularColor.z * 0.5f, map.SpecularColor.w * 0.5f)); }
public void Initialize() { GameController.MainCamera.orthographicSize = sizeMin; chromaticFx = effectStackProfile.chromaticAberration.settings; vigneteFx = effectStackProfile.vignette.settings; bloomFx = effectStackProfile.bloom.settings; UpdateFX(); }
public float blueSpeed, bloomSpeed; //control how intense effects are // Use this for initialization void Start() { //assigns everything and starts them at default values since script permantely edits file colorS = mainProfile.colorGrading.settings; colorS.channelMixer.blue = new Vector3(0f, 0f, 1f); bloomS = mainProfile.bloom.settings; bloomS.bloom.intensity = 0; }
void Start() { BloomModel.Settings bloomSettings = ppProfile.bloom.settings; bloomSettings.bloom.intensity = 6f; bloomSettings.bloom.threshold = 1.12f; bloomSettings.bloom.softKnee = 0.515f; ppProfile.bloom.settings = bloomSettings; }
private void Awake() { postProcessBehavior = GetComponent <PostProcessingBehaviour>().profile; bloom = postProcessBehavior.bloom.settings; bloom.bloom.intensity = 0f; }
void Update() { PostProcessingProfile postfx = behaviour.profile; BloomModel.Settings model = postfx.bloom.settings; model.bloom.intensity = Mathf.Lerp(bloomMin, bloomMax, reaktor.Output); postfx.bloom.settings = model; }
//run every frame private void Update() { //offset grid material texture with speed relative to audio gridMaterial.mainTextureOffset -= new Vector2(0, AudioManager.spectrum[spectrumIndex] * gridSpeedMultiplier); //sync camera bloom intensity to audio BloomModel.Settings bloomSettings = postProcess.bloom.settings; bloomSettings.bloom.intensity = Mathf.Lerp(bloomSettings.bloom.intensity, AudioManager.spectrum[spectrumIndex] * bloomMultiplier, bloomDampen * Time.deltaTime); postProcess.bloom.settings = bloomSettings; //sync chromatic aberration intensity to audio ChromaticAberrationModel.Settings chromaticSettings = postProcess.chromaticAberration.settings; chromaticSettings.intensity = Mathf.Lerp(chromaticSettings.intensity, AudioManager.spectrum[spectrumIndex] * chromaticMultiplier, chromaticDampen * Time.deltaTime); postProcess.chromaticAberration.settings = chromaticSettings; //sync camera fov to audio Camera.main.fieldOfView = 60 - AudioManager.spectrum[spectrumIndex] * fovMultiplier; //sync sun size to audio aestheticSun.transform.localScale = Vector3.Lerp( aestheticSun.transform.localScale, new Vector3(AudioManager.spectrum[spectrumIndex] * sunMultiplier + 1.6f, 1, AudioManager.spectrum[spectrumIndex] * sunMultiplier + 1.6f), sunDampening * Time.deltaTime); //extra functions if (Input.GetKeyDown(KeyCode.F2)) { vaporwaveMode = !vaporwaveMode; if (vaporwaveMode) { backgroundMaterial.SetColor("_EmissionColor", vaporwaveColor); } else { backgroundMaterial.SetColor("_EmissionColor", synthwaveColor); } GameObject.Find("VaporwaveText").GetComponent <Text>().enabled = vaporwaveMode; GameObject.Find("SynthwaveText").GetComponent <Text>().enabled = !vaporwaveMode; } else if (Input.GetKeyDown(KeyCode.F3)) { glitchEffects = !glitchEffects; GameObject.Find("EffectsCamera").GetComponent <CameraFilterPack_FX_Glitch1>().enabled = glitchEffects; GameObject.Find("EffectsCamera").GetComponent <CameraFilterPack_NewGlitch3>().enabled = glitchEffects; GameObject.Find("PlayImage").GetComponent <SpriteRenderer>().enabled = glitchEffects; } else if (Input.GetKeyDown(KeyCode.F1)) { textParent.SetActive(!textParent.activeSelf); } else if (Input.GetKeyDown(KeyCode.F4)) { Camera.main.GetComponent <PostProcessingBehaviour>().enabled = !Camera.main.GetComponent <PostProcessingBehaviour>().enabled; } }
void Update() { settings = behaviour.profile.bloom.settings; if (settings.bloom.intensity > nomalIntensity) { settings.bloom.intensity -= Time.deltaTime * minusIntensity; } behaviour.profile.bloom.settings = settings; }
public void OnPlayEffect(Collider other = null) { PostProcessingBehaviour behaviour = Camera.main.GetComponent <PostProcessingBehaviour>(); BloomModel.Settings settings = Camera.main.GetComponent <PostProcessingBehaviour>().profile.bloom.settings; settings.bloom.intensity = intens; behaviour.profile.bloom.settings = settings; return; }
//=====================Post Processing stack=========================// public void SetBloom(float intensity) { tickSound.Play(); //Debug.Log("intensity: " + intensity); BloomModel.Settings bloomSettings = ppProfile.bloom.settings; bloomSettings.bloom.intensity = intensity * 10; ppProfile.bloom.settings = bloomSettings; AmbientOcclusionModel.Settings ABOCL = ppProfile.ambientOcclusion.settings; ABOCL.intensity = intensity; }
void Start() { profile = Camera.main.GetComponent <PostProcessingBehaviour>().profile; bloomSettings = profile.bloom.settings; vignetteSettings = profile.vignette.settings; grainSettings = profile.grain.settings; ResetGrain(); ResetVignette(); }
private void SetBrightnsee(float value) { if (postProcessBehavior == null) { return; } bloom = postProcessBehavior.bloom.settings; bloom.bloom.intensity = value * 4f; postProcessBehavior.bloom.settings = bloom; }
private void Awake() { ppb = GetComponentInChildren <PostProcessingBehaviour>(); bloomSettings = ppb.profile.bloom.settings; orinCubePosition = Cube.transform.localPosition; orinCubeRotation = Cube.transform.localRotation; orinCubeScale = Cube.transform.localScale; }
void SetBloom(float b) { BloomModel pb = PPProfile.bloom; BloomModel.Settings bms = pb.settings; BloomModel.BloomSettings bs = bms.bloom; bs.intensity = b; bms.bloom = bs; pb.settings = bms; PPProfile.bloom = pb; }
void ChangeBloomAtRuntime() { //copy current bloom settings from the profile into a temporary variable BloomModel.Settings bloomSettings = ppProfile.bloom.settings; //change the intensity in the temporary settings variable bloomSettings.bloom.intensity = 2; //set the bloom settings in the actual profile to the temp settings with the changed value ppProfile.bloom.settings = bloomSettings; }
//Set start values again void Awake() { if (GameManager.instance == null) { //Instantiate gameManager prefab Instantiate(gameManager); } BloomModel.Settings bloomSettings = _profile.bloom.settings; bloomSettings.bloom.intensity = 0.5f; _profile.bloom.settings = bloomSettings; }
private void TweenBloomAberration(float time, AnimationCurve curve) { BloomModel bloomModel = postProcessingBehaviour.profile.bloom; BloomModel.Settings bloomModelSetting = postProcessingBehaviour.profile.bloom.settings; LeanTween.value(0, 1, time).setEase(curve).setOnUpdate(delegate(float val) { bloomModelSetting.bloom.intensity = val; bloomModel.settings = bloomModelSetting; }); }
IEnumerator ProcessWeedEffect() { while (true) { BloomModel.Settings settings = profile.bloom.settings; settings.bloom.softKnee = player.GetComponent <WeedEffect>().intoxication / 100f; profile.bloom.settings = settings; yield return(new WaitForSeconds(0.25f)); } }
protected override void SetupEffects() { //Model Settings motionBlurModel = profile.motionBlur.settings; bloomModel = profile.bloom.settings; vignetteModel = profile.vignette.settings; InitialEffectsSettings(); //Parameters Compensation motionBlurFrameBlending -= initialMotionBlurFrameBlending; bloomIntensity -= initialBloomIntensity; }
public bool start() { if (m_postProcessing != null) { return(false); } m_postProcessing = m_manager.getComponentPostProcessingBehaviour(); m_postProcessing.profile.bloom.enabled = true; m_bloomModelSettings = m_postProcessing.profile.bloom.settings; m_bloomModelBloomSetting = m_bloomModelSettings.bloom; return(true); }
public void Settings() { profile.antialiasing.enabled = AAenable.Value; AntialiasingModel.Settings AAsettings = profile.antialiasing.settings; AAsettings.method = AAMethod.Value; //AntialiasingModel.Method.Taa; AAsettings.fxaaSettings.preset = FXAAPreset.Value; //AntialiasingModel.FxaaPreset.ExtremePerformance; AAsettings.taaSettings.jitterSpread = TAAjittetSpeed.Value; AAsettings.taaSettings.sharpen = TAAsharpen.Value; AAsettings.taaSettings.stationaryBlending = TAAstationaryBlending.Value; AAsettings.taaSettings.motionBlending = TAAmotionBlending.Value; profile.antialiasing.settings = AAsettings; profile.ambientOcclusion.enabled = AOenable.Value; AmbientOcclusionModel.Settings AOsettings = profile.ambientOcclusion.settings; AOsettings.intensity = AOintensity.Value; AOsettings.downsampling = AOdownsampling.Value; AOsettings.forceForwardCompatibility = AOforceForwardCompatibility.Value; AOsettings.sampleCount = AOsampleCount.Value;//AmbientOcclusionModel.SampleCount.High; AOsettings.highPrecision = AOhighPrecision.Value; AOsettings.ambientOnly = AOambientOnly.Value; AOsettings.radius = AOradius.Value; profile.ambientOcclusion.settings = AOsettings; profile.screenSpaceReflection.enabled = SSRenable.Value; ScreenSpaceReflectionModel.Settings SSRsettings = profile.screenSpaceReflection.settings; SSRsettings.intensity.reflectionMultiplier = SSRrefMultiplier.Value; SSRsettings.intensity.fadeDistance = SSRfadeDistance.Value; SSRsettings.intensity.fresnelFade = SSRfresnelFade.Value; SSRsettings.intensity.fresnelFadePower = SSRfresnelFadePower.Value; SSRsettings.reflection.blendType = SSRrefBlendtype.Value; SSRsettings.reflection.reflectionQuality = SSRrefQuality.Value; SSRsettings.reflection.maxDistance = SSRmaxDistance.Value; SSRsettings.reflection.iterationCount = SSRiterationCount.Value; SSRsettings.reflection.stepSize = SSRstepSize.Value; SSRsettings.reflection.widthModifier = SSRwidthModifier.Value; SSRsettings.reflection.reflectionBlur = SSRrefBlur.Value; SSRsettings.reflection.reflectBackfaces = SSRrefBackfaces.Value; SSRsettings.screenEdgeMask.intensity = SSRscreenEdgemaskIntensity.Value; profile.screenSpaceReflection.settings = SSRsettings; profile.bloom.enabled = Bloomenable.Value; BloomModel.Settings bloomsetting = profile.bloom.settings; bloomsetting.bloom.intensity = Bloomintensity.Value; bloomsetting.bloom.radius = Bloomradius.Value; bloomsetting.bloom.softKnee = BloomsoftKnee.Value; bloomsetting.bloom.threshold = Bloomthreshold.Value; bloomsetting.bloom.antiFlicker = BloomAntiFk.Value; profile.bloom.settings = bloomsetting; //Debug.LogError("testtesttest"); }