diff options
author | chai <chaifix@163.com> | 2021-10-01 10:12:24 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-10-01 10:12:24 +0800 |
commit | 4a5ca9210f40d454aeef3e9423914fa6ffe4aabc (patch) | |
tree | cd184224792bf04e29992e78b9a0992e16763aa7 /Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc | |
parent | f0ae9393da021fe16af32f7ae1a3245f27050f92 (diff) |
*misc
Diffstat (limited to 'Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc')
-rw-r--r-- | Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc b/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc index 7f657e59..de9dccdd 100644 --- a/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc +++ b/Assets/Bundle/Shaders/Common/Image/ImageEffect.cginc @@ -17,6 +17,7 @@ float4 _UnitMotionVectorTexture_ST; float4 _UnitTileOffset; + // functions // 只对一小部分进行后处理 @@ -31,3 +32,17 @@ fixed2 CalculateUnitTillOfssetUV(fixed2 uv0) { return uv0 * _UnitTileOffset.xy + _UnitTileOffset.zw; } + +struct image_v2f +{ + float2 uv : TEXCOORD0; + float4 vertex : SV_POSITION; +}; + +image_v2f image_vert(appdata_img v) +{ + image_v2f o; + o.vertex = CalculateUnitTillOfssetVertex(v.vertex); + o.uv = CalculateUnitTillOfssetUV(TRANSFORM_TEX(v.texcoord, _MainTex)); + return o; +}
\ No newline at end of file |