之前写的扰动shader找不到了,重写了一个。
效果图:
C#代码很简单:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Distortion : MonoBehaviour
{
public Material mat;
void OnRenderImage(RenderTexture src, RenderTexture dst)
{
Graphics.Blit(src, dst, mat);
}
}
Shader "Custom/Distortion"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
_R("R&#