Chroma Keying on original Radeon

Hi!

I’m in the process of finishing up a Radeon specific glide emulator. I’m making heavy use of the GL_ATIX_env_combine3 extension for TMUs and color/alpha combiners and have only one of the three texture environments left to implement chroma keying. This alone prohibits me of emulating Voodoo2 class hardware but also gets a bit tricky when doing Voodoo1 class hardware.

The paramount problem here is chroma keying. I can do it with multi-passing (four to be exact), the alpha test and the stencil buffer, that’s not the problem. But I would like to be able to do it a little quicker.

My questions to you good folk:
1)Is there any clever way of doing true general chroma keying with a single texture environment?
2)Is there any way of virtualizing the Radeons TE pipe so that I could use six environments with different configs? I wouldn’t mind a speed hit, I just wonder wether it can be done at all?

Any input greatly appreciated!

[This message has been edited by zeckensack (edited 02-26-2002).]