dege-diosg / dgVoodoo2

Glide/DirectX implementation on D3D11/12
910 stars 40 forks source link

[Feature request] Add option to force max texture resolution #56

Open spaztron64 opened 3 years ago

spaztron64 commented 3 years ago

Having the option to mimic, for example, the texture constraints of a Voodoo 2 or 3 (256x256) would greatly help in testing game mods where the goal is to maintain full compatibility with such hardware. While this is sort of possible under PCem and 86box with their emulation of the V2 and 3, they are way too slow and incomplete for it to be practical yet. Another use case would be saving on VRAM in games that lack the options to change texture quality.

I'm not sure if this is even achievable, but it doesn't hurt to ask I guess.

dege-diosg commented 3 years ago

You mean, maximizing texture size via DDraw/D3D? Because 256x256 is already the maximum via Glide, only Napalm provides larger sizes.

spaztron64 commented 3 years ago

No no no, the other way around. Make it so that a DDraw/D3D game can't map textures above a certain resolution, and downscale any texture that's above this user-defined threshold.

dege-diosg commented 3 years ago

Ok, I see. You'd need an additional step to resize a texture to a given size under certain conditions. I don't see the point of it for regular (for gaming) usage, especially because of the fact that advanced rendering techniques can easily get broken with re-scaled texture or forced sampling filters. That's why I wouldn't introduce config options for that.

It's more like a developer need, so I may reconsider the concept of add-ons. dgVoodoo could call into your dll when the texture is converted, and provide a rescaling step with the parameters your callback gives back.