Ogre的透明贴图

来源:互联网 发布:vb.net 调用大漠 编辑:程序博客网 时间:2024/05/07 16:54

参考:http://www.cnblogs.com/virtorld/archive/2012/11/16/2773328.html

Ogre加载模型可以用两种透明贴图,

一种是自带透明信息的PNG格式,material文件里要有sene_blend alpha_blend

material Bill_Texture
{
technique
{
pass
{
ambient 0.588 0.588 0.588 1
diffuse 0.588 0.588 0.588 1
specular 0 0 0 1 10

sene_blend alpha_blend

depth_write off    

cull_hardware none  // 双面
cull_software none
texture_unit
{
texture checker.png
}
}
}
}

一种是用黑白蒙版(遮罩)贴图的JPG或PNG格式,material文件里要有scene_blend add

material Bill_Texture
{
technique
{
pass
{
ambient 0.588 0.588 0.588 1
diffuse 0.588 0.588 0.588 1
specular 0 0 0 1 10

sene_blend add

depth_write off    

cull_hardware none  // 双面
cull_software none
texture_unit
{
texture checker.png
}
}
}
}


0 0
原创粉丝点击