RE: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Stephen J B. <sj...@li...> - 2000-07-31 13:03:56
|
On Sun, 23 Jul 2000, Brian Marshall wrote: > The N64 supports this op. It was used for the bullet holes in Perfect Dark > (and Goldeneye.). It still doesn't give a glitch free result. It does 'clip' > to the edges on polygons when the decal goes over the edge of the polygon > its sat on, but its really just scissoring with Z to do that. > One thing to remember is that the error in the z slope calculations on the > small decal polygon is higher than that on a larger (in screen space) > polygon. So you are always going to have some accuracy worries. Using one > decal polygon the same size as the surface it's resting on may work very > well. With individual decals someone will always get them all on one wall if > you let them - which is a big hit with individual decals, small with one big > decal. > Unless you can use precisely the same polygon for generating Z values you > will need to add Z-bias to minimize glitching. Strictly speaking (in OpenGL at least), even making the polygons the same size won't guarantee no Z-fighting. The OpenGL spec allows implementations to generate different Z values even when vertices are shared when certain GL states are not shared. The reason for that is that you might (for example) have to do a software fallback for one set of states and not for the other - since software and hardware rendering are unlikely to generate the exact same Z values, you can't guarantee no Z-fighting. However, you'll probably get away with it on most machines. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@li... http://www.link.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |