Re: [Algorithms] Bullets on walls
Brought to you by:
vexxed72
From: Mark W. <mwa...@to...> - 2000-07-21 04:52:25
|
An extension to Jaimi's method may be to render the bullet holes to an overlay texture (of which you would have a maximum number) which is only rendered *once* on-top of the wall. With complex texture mapping this is obviously not possible, but perhaps for simple quads it would be acceptable ? Perhaps some form of scalable solution - like use Jaimi's method for a small number and when a threshold is reached, combine them into the single texture as I've mentioned and repeat ... ?? Just my 2c worth ... Mark > In d3d, this is the way I do it: > > Create decals with a one pixel transparent border. > Then, set the texture address mode to "Clamp". > Calculate new UV coordinates for your decal based on the wall, instead > of the Decal - then redraw the entire wall with your decal texture and > new UV coordinates. > This way you do not have to clip at all. I would assume you could > do the same in OpenGL. > > Jaimi |