unity Post-processing的使用
最近在学习PostProcessing这个插件找了很多资料记录一下
哔哩哔哩讲的很细
尝试了一下用Post-processing做了一个边角压暗的效果
代码如下:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.Rendering.PostProcessing;
public class VignetteControl : MonoBehaviour
{
public Transform cameraTrans;
PostProcessVolume processProfile;
Vignette vignette;
Camera mainCamera;
float vignetteIntensity = 0;
float t1;
float t;
private void Start()
{
processProfile = GetComponent<PostProcessVolume>();
processProfile.