需要的效果
最终实现的效果大概如下:
4个贴图上去
这里随便放一个切分的图。
Shader代码如下
直接上代码:
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
// Unlit shader. Simplest possible textured shader.
// - no lighting
// - no lightmap support
// - no per-material color
Shader "Unlit/TextureMy" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {
}
_MainTex0 ("Base0 (RGB)", 2D) = "white" {
}
_MainTex1 ("Base1 (RGB)", 2D) = "white" {
}
_MainTex2 ("Base2 (RGB)", 2D) = "white" {
}
_MainTex3 ("Base3 (RGB)", 2D) = "white" {
}
}