TextureWrapMode.Clamp 钳制
Description描述
Clamps the texture to the last pixel at the border.
钳制纹理到边框的最近像素,也就是单个图片,不重复平铺。
This is useful for preventing wrapping artifacts when mapping an image onto an object and you don't want the texture to tile. UV coordinates will be clamped to the range 0...1. When UVs are larger than 1 or smaller than 0, the last pixel at the border will be used.
这通常用于当映射一个图片到一个物体上,并不想纹理平铺。纹理坐标将被钳制在0...1之间。当UV大于1或小于0时,在边框的最近像素将被使用。
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
void Awake() {
renderer.material.mainTexture.wrapMode = TextureWrapMode.Clamp;
}
}
renderer.material.mainTexture.wrapMode = TextureWrapMode.Clamp;
最后修改:2011年5月24日 Tuesday 15:51