Quantcast
Channel: Questions in topic: "post processing"
Viewing all articles
Browse latest Browse all 713

Post Processing Effects Not Being Shown From Script

$
0
0
I've been using a script to create a new vignette effect. I am able to get it to create the profile, but it never shows the vignette on the actual game screen. On the inspector I am able to see very clearly that the effect is there and enabled, but it still won't update. I have the effects on my main camera. The image shows what it looks like in the inspector. ![inspector][1] My script is written like this: using UnityEngine; using UnityEngine.Rendering; using UnityEngine.Rendering.Universal; public class CameraScript : MonoBehaviour { // * Changes vignette Volume vol; Vignette vg; void Awake() { vol = gameObject.GetComponent(); vg = vol.profile.Add(); vg.color = new ColorParameter(Color.red, true); vg.intensity = new ClampedFloatParameter(.6f, .5f, .7f, true); vg.smoothness = new ClampedFloatParameter(.2f, .15f, .25f, true); } } Does anyone have any idea how to fix this? [1]: /storage/temp/202239-screenshot-2022-11-25-105932.png

Viewing all articles
Browse latest Browse all 713

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>