VOGONS


First post, by leileilol

User metadata
Rank l33t++
Rank
l33t++

All I can think of are destroyed bodies in Doom 3, and maybe the wood/trees in Black & White

Alphatests skips drawing a pixel after an alpha channel's threshold and doesn't carry the sorting issues an alpha blend would have. They're seen on stuff like grates and vents, and can also be used with lightmaps to be shaded while still having holes with depth operations.

But then there's alpha modulation with them, which can potentially lead to interesting effects when done creatively. The thing is, I can't think of many PC games that do to give concrete examples. There's also the possibility of early 3d hardware not being able to do this (not just those not modulating alpha blends). There's some console examples I can think of (Wind Waker), and modern PC game examples that are likely pixel shaders in disguise (like Left4Dead2's gore system for the infected).

It's probably not an important enough specific capability. It's not table fog or paletted texture critical. I'd also prefer replies that do their homework and show an alphatest get modulated somewhere from a game or benchmark from the 96-04 period

apsosig.png
long live PCem

Reply 1 of 6, by chuky

User metadata
Rank Newbie
Rank
Newbie

In Little Big Adventure 2 from 1997 there's a magical hologram with what looks like alpha testing. It's all software rendering though. The creator of the game said there would be a 3dfx version but they never made it.
Some parts of the hologram turn white, some parts look alpha tested and disappear, her necklace is made of 2d lines and her hair is made of octogons. She seems to have the same kind of texture as the animated texture in the menu.

I also found at the end of the game in the last level, teleporters also have alpha testing with the same kind of animated texture. It's hard to see the alpha testing because the background is dark and the shape moves fast, but the texture is actually animated and it uses a similar texture.

I recorded them here at 60 fps.
https://www.mediafire.com/file/jto28cutnetx8y … esting.zip/file

The hologram is also here at 31:17.
https://youtu.be/lkpdAzWVp7Q?si=F8keqW8qrlkv4dpJ&t=1877

Reply 2 of 6, by chuky

User metadata
Rank Newbie
Rank
Newbie

In Jak and Daxter on Playstation 2 in 2001 I think there's such an effect when infected plants glow. It happens really fast but when blue plants grow vertically, the alpha threshold changes to make leaves appear. Maybe it also happens when plants disappear but I'm not sure. It's hard to see because the shape of the plant changes and everything happens very fast. You have to put it in slow motion to see it.
This was recorded on an emulator, so it must be even harder to notice on a ps2. At 1:32:25, the level is called the precursor basin.
https://youtu.be/r1sTeAkQL7Q?si=qxX2jfjtx8imGq_J&t=5545

edit: Little Big Adventure 2 could also be vertex color with alpha testing.

Reply 3 of 6, by Deano

User metadata
Rank Newbie
Rank
Newbie

Modulating the alpha was fairly hit and miss on a variety of earlier cards, so wasn't used a lot. I specifically remember the RIVA128 dropped back to SW (in D3D which was explicitly not allowed) if you used alpha texture and vertex alpha at the same time, was an interesting debugging session to figure that out 😀 Alpha test worked fine on all cards IIRC but obviously if vertex alpha modulation wasn't supported, alpha test was purely from the texture.

IIRC we used it at one point in VR Sport Powerboat Racing for the water trails from the boat. We had various fallbacks for cards that couldn't do it. TBH maybe we didn't ship with it...

Game dev since last century

Reply 4 of 6, by chuky

User metadata
Rank Newbie
Rank
Newbie

Tonic Trouble from 1999 has alpha tested transitions between levels, using the alpha to animate the transition. There are many random transitions. A few are alpha blended. Not all transitions look good but they're easy to see. The game seems to be directx 6.
Examples at 6:01, 8:03, 9:23, 9:52, 11:02, 15:43, 19:02, 22:31, 25:11, 33:04, 41:13, etc.
https://youtu.be/fBecSLzSgLE?si=JqvzLiD9i2R4z1FN&t=2473

Reply 5 of 6, by leileilol

User metadata
Rank l33t++
Rank
l33t++
Deano wrote on 2023-11-17, 15:11:

IIRC we used it at one point in VR Sport Powerboat Racing for the water trails from the boat. We had various fallbacks for cards that couldn't do it. TBH maybe we didn't ship with it...

Very interesting, i'd assume it wasn't working because of the reflections potentially doing depth conflicts

apsosig.png
long live PCem

Reply 6 of 6, by Deano

User metadata
Rank Newbie
Rank
Newbie
leileilol wrote on 2023-11-19, 02:27:

Very interesting, i'd assume it wasn't working because of the reflections potentially doing depth conflicts
[/quote]

IIRC We had alpha in the texture and then used vertex alpha to add some variation as the trail moved. We use alpha test to cut the edge completely for performance.
Some of the problems we had was one card wrote depth regardless of alpha test, another fell back to software if both types of alpha were used, another couldn't do colour vertex interpolation. I think we just decided to do a different effect in the end, as was a constantly breaking with different card and drivers.

We rendered the 4 stages, the reflection were rendered as normal just reflected and a vertex sin wave for wobble. Then we rendered the water 'plane' (its actually a sine based surface), even though transparent we wrote depth so it worked as a clipping plane. Then we rendered the normal world and boats, then finally the wakes and fx. The wakes wrote depth so we could overlay several and also clip water particles.

Game dev since last century