Re: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Stephen J B. <sj...@li...> - 2000-07-21 14:06:02
|
On Fri, 21 Jul 2000, Neal Tringham wrote: > > Giovanni Bajo <ba...@pr...> writes: > > In DirectX, there is a ZBIAS stuff that let you set a priority order > > (integer) when Z matches. It is a renderstate. But looking at the caps, it > > is not supported in every boards I have tried. I heard it is an old > thingie > > of first Voodoo boards. > > Yes, the support for zbias seems to be rather inconsistent. > > > I had not found something similiar in OpenGL. > > You may want to look at the 1.1 glPolygonOffset function. In OpenGL (and presumably in D3D also), you can fake a polygon offset by moving the near clip plane a tiny bit between drawing the 'base' and 'decal' polygons. This (in effect) changes the "meaning" of all the numbers currently stored in the Z buffer - so they represent a distance that is a little further away than than they did when they were originally rendered. In effect, this moves the entire scene backwards a little bit. You need to experiment a bit with how much to move it - but it's a trick that does work on ALL hardware. 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 |