Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
GoatLord

How do you display textures on top of each other without clipping?

Recommended Posts

The Build Engine, for example. Stuff ike the graffiti on walls (as in the first map), blood on the floors and walls, Duke's footprints, magazines on tables, etc.

Most of these things would be made into 3D models by today's standards, but blood is still often handled by textures and I cannot for the life of me figure out how they don't cause clipping issues, as I assume they are on the same plane. I remember seeing a few examples of this in Doom 64, but upon close inspection, such decals were ever so slightly raised from the surface they supposedly sat upon.

Share this post


Link to post

One method is to have a decal be offset slightly along the normal of the surface. Another is to blend it in a pixel shader.

Share this post


Link to post

Build uses sprites for most of that stuff. You make a thing for that little piece of graffiti, align it to a plane, and stick put it on a wall. They appear to just be drawn after the map geometry is drawn and they have all kinds of clipping issues with various things, but not the ugly z-fighting issue you're used to seeing in Doom ports and games like Half-Life.

The blood and footprints probably work at lot like the ones in Doom ports.

Share this post


Link to post
GoatLord said:

I remember seeing a few examples of this in Doom 64, but upon close inspection, such decals were ever so slightly raised from the surface they supposedly sat upon.


Incidentally I remember noticing the same thing with the PSX Duke games as well. Many decals even ones such as bullet holes aren't actually flush with the surface they appear on and I guess that's just because they're each their own unique "thing", which is why in some games they tend to just dissipate after a certain amount of time to save memory.

Share this post


Link to post

Can anyone comment on when pixel shaders came about? And why Doom source ports don't use them? Or do they?

Share this post


Link to post

Games like blood and doom didn't deal with z-fighting issues because they didn't use a zbuffer to clip surfaces before drawing them, they would just sort planes as indivisible units and paint them one on top of the other.

"pixel shaders" have in their most basic form been around for pretty much forever. I don't know if anyone has drawn any hard lines on when they started becoming prevalent in modern pipelines, though afaik they only started being really recognized as their own distinct part of the job about 10 to 15 years ago when gpu manufacturers actually started facilitating their development.

Some doom sourceports do use shaders, ie gzdoom (for optional lighting), but the reason most don't is simply because they don't need to.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×