material的主要是写脚本~
material MyMaterial1
{
technique
{
pass
{
texture_unit
{
texture leaf.png
tex_address_mode clamp
}
}
}
}
material MyMaterial11
{
technique
{
pass
{
texture_unit texture1
{
texture terr_rock6.jpg
rotate_anim 0.1
}
}
}
}
material MyMaterial12 : MyMaterial11
{
set_texture_alias texture1 Water02.jpg
}
tex_address_mode就是贴图的方式啦~值得注意的是在border模式下可以通过tex_border_color更改背景颜色。
rotate_anim就是旋转~scroll_anim就是滚动~
最后一个例子是通过继承创建材质,将贴图换成Water02.jpg,其他属性保留。