在游戏里面鼠标与某个npc相交了后,就让npc的边缘高亮显示或者怎么处理下,让玩家很明确地知道他点下去就能选中此npc。《卓越之剑》有这效果。google了下没找到相关资料。
我在gamedev上的
提问:
when the cursor is over an entity, I want to highlight it's edge so that a player can immediately know he can pick this
entity after he click the mouse left button.for example, there are many monsters around the main character in the game,
it is not easy to pick one monster.I googled this,but found nothing.who can give me some suggestion?
老外的回答:
The simplest method is to draw the object colored in the highlight color, with some scaling to make it larger than the
original object. Do this drawing with depth writes turned off. Then, after this, draw the object as usual, with depth
writes on again.There are more complex methods, depending on your application - depending on what is your bottleneck,
depending on complexity of your monster models etc etc. but the method above is simple to implement and should work
for most cases.
逍遥剑客对此问题的解决办法2009-7-3
学习了这么久,也自己试试
遇到的问题:
Pass 0 Render State设为D3DCULL_CW,
Pass 1 Render Staete要设为D3DCULL_None
posted on 2007-11-18 20:30
七星重剑 阅读(2016)
评论(6) 编辑 收藏 引用 所属分类:
Game Graphics