Shader "Custom/SimpleGrabPassBlur" {
Properties{
_Color("Main Color", Color) = (1,1,1,1)
_BumpAmt("Distortion", Range(0,128)) = 10
_MainTex("Tint Color (RGB)", 2D) = "white" {}
_BumpMap("Normalmap", 2D) = "bump" {}
_Size("Size", Range(0, 200)) = 1
}
Category{
// We must be transparent, so other objects are drawn before this one.
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Opaque" }
SubShader{
// Horizontal blur
GrabPass{
Tags{ "LightMode" = "Always" }
}
Pass{
Tags{ "LightMode" = "Always" }
CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
struct appdata_t {
float4 vertex : POSITION;
float2 texcoord: TEXCOORD0;
};
struct v2
模糊背景shader
最新推荐文章于 2024-04-12 14:00:23 发布