Unity shader算法收集之缩放uv
缩放uv算法代码如下:
1 half2 ScaleUVsByCenter(half2 uv, float scale) 2 { 3 float2 center = float2(0.5, 0.5); 4 return (uv - center) / scale + center; 5 }
缩放uv算法代码如下:
1 half2 ScaleUVsByCenter(half2 uv, float scale) 2 { 3 float2 center = float2(0.5, 0.5); 4 return (uv - center) / scale + center; 5 }