Software decal system

Discuss programming topics for the various GPL'd game engine sources.
Post Reply
leileilol
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Software decal system

Post by leileilol »

Half-Life did it by blending textures (w/ mips!) into the surfacecache. SiN did it by spamming sprites.

I suspect something similar to the particle system would have to be done to manage them? (i.e. finding closest wall to particle, applying texture on surface update, as well as seeking out similar decal near it to prevent overdraw)

Did FTEQW venture into decals like this? I forgot.
i should not be here
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Re: Software decal system

Post by Spike »

Software rendered FTE did not support decals at all. You'd have to use sprites.

Current versions use clipped decals.
Clipped decals are basically a case of 'take every polygon in the world and chop it up acording to 6 planes'.
If you have texture clamping, you can instead just find the polygons within the decal and redraw those surfaces with a different texture and a specific tcgen.
If you want to remove overdraw, you can grab (current) fte's q1bsp.c Q1BSP_ClipDecal, but you'll have to tweak it to use the edge/direction/vert stuff of software rendering instead of gl's simpler triangle fans. This won't do any magic pvsey things though, but is less invasive.
Post Reply