您最多选择25个主题 主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 

37 行
777 B

Shader "Hidden/DistordFromTex"
{
Properties
{
_Tex("InputTex", 2D) = "white" {}
_Scale("Scale", Float) = 2
_Bias("Bias", Float) = -1
}
SubShader
{
Tags { "RenderType"="Opaque" }
LOD 100
Pass
{
CGPROGRAM
#include "UnityCustomRenderTexture.cginc"
#pragma vertex CustomRenderTextureVertexShader
#pragma fragment frag
#pragma target 3.0
sampler2D _Tex;
float _Scale, _Bias;
float4 frag(v2f_customrendertexture IN) : COLOR
{
float4 c = float4(0,0,0,0);
c.rgb = tex2D(_Tex, IN.localTexcoord.xy).rgb;
c.rg = c.rg * _Scale + _Bias;
return c;
}
ENDCG
}
}
}