schellingb / dosbox-pure

DOSBox Pure is a new fork of DOSBox built for RetroArch/Libretro aiming for simplicity and ease of use.
GNU General Public License v2.0
759 stars 62 forks source link

Texture rendering issues in most 3dfx games #316

Open PoloniumRain opened 2 years ago

PoloniumRain commented 2 years ago

There's two texture issues when using 3dfx:

  1. Many games have very blurry textures. This might be due to a mipmap issue, and this problem was also mentioned by Digital Foundry at this point in their video - That is running on an Xbox Series X by the way, but i'm using Windows 10. First person shooters and racing games are affected most because textures will become blurry when viewed from an angle. Looking directly straight at a texture will sometimes make the blurriness go away (see video below). There's also some games which do not not have this issue at all, but many do.

  2. Trilinear filtering doesn't work in games which support this feature. At least with all the games i've tried so far (Quake 3 being an obvious example).

Neither of these issues occur on real hardware, or when running Windows 98 on DOSBox-X or PCem with a 3dfx Voodoo 1.

Here's a clear example of textures becoming blurry at angles:

https://user-images.githubusercontent.com/50634894/179727608-aafc39e6-3cb7-47dc-8cad-fefce5d8a6d7.mp4

So far only Windows games are affected. I haven't seen these problems in 3dfx DOS games, although i haven't tried many DOS games yet. Maybe other people can test some more?

So far i've tried:

None of them make any difference.

schellingb commented 2 years ago

Can you clarify if you were using the software 3dfx emulation in DOSBox-X or if you had the glide or GL passthrough enabled?

I would have thought the software rendering should behave the same as in other DOSBox variants that have had the 3dfx patch applied but there's a chance I made a mistake when integrating it or someone has made improvements I'm not aware of.

PoloniumRain commented 2 years ago

Sorry for late reply, been insanely busy! As far as i can tell i'm not using passthrough. Video > 3dfx emulation is set to 'Internal Voodoo card'.

PoloniumRain commented 2 months ago

Just an update for anyone that has this problem...

The new (currently unreleased) 'Hardware OpenGL' feature within Core Options > Video will fix this issue.

It can also be fixed with the current 3dfx 'Software' setting in the same Video menu. At least in some games, like ones that use the "id Tech" engine from ID Software. So Quake 1, 2, 3 and Half-Life, amongst others. The problem is caused by texture filtering when mipmaps are enabled. If a game doesn't use this combination, or lets you disable mipmaps, it should look fine.

Mipmaps can be disabled in "id Tech" games with either of the below commands in the console menu, which can usually be accessed in-game by pressing the backtick ( ` ) key, or tilde ( ~ ) key:

gl_texturemode gl_nearest - Disables texture filtering and mipmaps, giving textures a non-3dfx pixelated look. gl_texturemode gl_linear - Enables texture filtering but without mipmaps.

These commands can also be put inside the AUTOEXEC.CFG file, so the game will start with the setting enabled. For example, with Quake this file is located in:

QUAKE > ID1 > AUTOEXEC.CFG (if the file doesn't exist, create it and open it with any text editor)