PostProcessing Editing

GMUIManager - Use ONE post process rather than two?

As you can see below the "GasMaskVisorUI" method is setting the VisorImage, the EnableVignette and the State of either GasPostProcess or the original. You can comment out those lines if you didn't want to change the state and just use one post processing effect.

 public void GasMaskVisorUI(bool on)
        {
            visorImageOverlay.SetActive(on);
            EnableVignette(on);
            if (on)
            {
                SwapPostProcessingProfile(PostProcessState.GasPostProcess);
            }
            else
            {
                SwapPostProcessingProfile(PostProcessState.OriginalPostProcess);
            }
        }
public void EnableVignette(bool on)
        {
            _vignette.active = on;
        }

Edit the Awake method below by changing the "gasMaskProfile" to "originalProfile" and you can use this instead to access the "_vignette" as per the EnableVignette method above.

        [SerializeField] private PostProcessVolume _postProcessingVolume = null;
        [SerializeField] private PostProcessProfile _originalProfile = null;
        [SerializeField] private PostProcessProfile _gasMaskProfile = null;
        private Vignette _vignette;
        private DepthOfField _dof;
        
        private void Awake()
        {c
            _gasMaskProfile.TryGetSettings(out _vignette);
            _gasMaskProfile.TryGetSettings(out _dof);
        }

Last updated