Hi Zeckensack!!
Thank you very much for offering your help!! 😎 😎 I think it's a good idea to help each other, I think I will contact you.
Yes, I handle grHint(GR_HINT_STW_DIFF_TMU0), I don't think there is a bug there. D3D can accept 1,2,3 and 4D texture coordinates, but in practice it uses only 2D for "normal" texturing, and 3D for environment textures (or 3D for projective texturing and 4D for projective environment texturing, dividing all the coordinates by the last component). AFAIK, when perspective is enabled for texturing, D3D (so that the GPU) internally interpolates the (sow,tow,oow) vector (and regenerates (s,t) from it), and simply (s,t) when perspective is disabled. Swimming textures are due to perspective is always set to false in 1.21 (it's a big bug). 😊
Texturing interacts with depth in one case: when w-buffering is used, texture perspective always has to be enabled in D3D otherwise some polygons doesn't get drawed or something like that (I didn't know it , that's why I brought in the emulation of w-buffering, true w-buffering didn't worked).
And you're right, I should implement the depth bias. It was implemented in one of the previous versions, but worked improperly. It wasn't clear for me how a real voodoo handles it when it uses w-buffering (I find it absurd a little bit to add bias to w considering it as a raw integer 😮 ).
Barev, 3dfx build engine can read parameters from environment variables. Gamma correction can also be defined in variable BUILD_GAMMA (or BUILD_BRIGHTNESS). Default gamma is 2.5, that's why the textures are so bright. I use it set to BUILD_GAMMA=1 and it works fine for me. I hope this will work for you too. (If you are interested in what other parameters exist, see 3dfx_readme.txt .)
I would like to try dgVoodoo with Carmageddon, but I don't have it, and can't find its demo (almost the same case with Screamer 2). 😒
Ableeker, thanks your log file! Do you get any error when you use w-buffering? If not, I really don't understand why it doesn't work for you. 😢