Unity3D 物体材质位移代码 附图
var scrollSpeed = 0.1;
function Update ()
{
var offset = Time.time * scrollSpeed;
renderer.material.SetTextureOffset ("_BumpMap", Vector2(offset/-7.0, offset));
renderer.material.SetTextureOffset ("_MainTex", Vector2(offset/10.0, offset));
}
bumpMap 和MainTex 是? "_MainTex" is the main diffuse texture .This can also be accessed via mainTextureOffset property.
"_MainTex"是主要的漫反射纹理,也能通过 mainTextureOffset 属性访问
"_BumpMap" is the normal map.
"_BumpMap"是法线贴图
"_Cube" is the reflection cubemap.
"_Cube"是反射cubemap.(立方体贴图)
坎坷坷看看可 赞~
好东西~谢谢啦啊~ 顶顶多好 说的非常好 很好哦 不错不错 LZ真是人才
页:
[1]