author: lua date:2005-8-12
Your best bet would be to vary the alpha component of the diffuse color of the material, ie, pass->setDiffuseColour
This is then used as alpha value for the entire material.
Make sure to use "scene_blend alpha_blend" and "depth_write off" in the material script for transparent objects
设置一幅具有alpha通道的图片到diffuse colour(应该是默认方式), 在材质中加入scene_blend src_alpha one_minus_src_alpha
和depth_write off选项即可.
2005/12/22补充:以上方法实现了之后,会有显示渲染顺序问题,完美解决方法是:
在材质定义中加入下面两句 alpha_rejection greater_equal 128 cull_hardware none, 就完全可以了。