Ogre的透明贴图

论坛 期权论坛 脚本     
匿名网站用户   2020-12-20 23:16   70   0

参考: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 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:1136255
帖子:227251
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP