Shade+Wireframe模式下的显示问题

来源:互联网 发布:淘宝网马云靠什么赚钱 编辑:程序博客网 时间:2024/05/22 00:56

OGRE中,只支持point/wireframe/solid三种模式,当然,也可以通过对同一个mesh绘制两次entity(一次solid,一次solid)的方式绘制solid+wireframe(即标题所说的shade+wireframe)模式。不过在此种模式下,会出现如下图所示的line一部分没有显示的问题:

shade+wireframe

不过,在OGRE的Pass中给出现一个解决办法:可以设置shade模式的DepthBais,如:material->getTechnique(0)->getPass(0)->setDepthBias(0.0f, -1.0f);

解决后的图片如:

shade+wireframe正确图片