dxwrapper icon indicating copy to clipboard operation
dxwrapper copied to clipboard

Moto GP URT3 Bloom support requires supporting D3DPTEXTURECAPS_NONPOW2CONDITIONAL

Open Squall-Leonhart opened this issue 7 months ago • 4 comments

As quoted by Dege

It needs non-pow2 textures for the bloom effect but misinterprets the D3D9 capability bits when checking out if they are supported. It works only if the 3D device supports them conditionally, but not when they are unconditionally supported (like on modern hw).

Dege made a patched game binary available for this, but I imagine it should be doable from the wrapper too by emulating `D3DPTEXTURECAPS_NONPOW2CONDITIONAL.

Squall-Leonhart avatar May 18 '25 14:05 Squall-Leonhart

Yes, it is certainly possible to change the caps in this way with a wrapper. However, this may cause issues with other games so it would need to be an optional caps change. It looks like that option was added in DX6 and is supported through DX9.

What version of DX is the game using?

elishacloud avatar May 18 '25 21:05 elishacloud

This one is Direct3D9

It seems nvidia had started to remove this cap by the point of Geforce 6, or atleast the drivers after FW 85.xx

However, this may cause issues with other games so it would need to be an optional caps change.

It shouldn't, also i was too quick to assume it was just the NPOT cap missing, it also needs D3DPTEXTURECAPS_POW2 which is also removed on modern hardware.

Squall-Leonhart avatar May 18 '25 22:05 Squall-Leonhart

If this issue has already been fixed with a patch why do you need a wrapper with this fix?

I did create a test build with a fix for this. I added a hidden feature you can add to the ini file called SetPOW2Caps.

Force caps change: 1 = force D3DPTEXTURECAPS_NONPOW2CONDITIONAL, 2 = force D3DPTEXTURECAPS_POW2, 3 = force both, 4 = remove both

Here is the test build: dxwrapper.zip

Let me know if this works.

BTW: I could just always force both. But some games may check if D3DPTEXTURECAPS_POW2 isn't there because the games may require non-POW2 textures. All new video cards support non-POW2 textures and it is likely that newer games use/require this. However, adding D3DPTEXTURECAPS_POW2 tells the game that the video card doesn't support non-POW2 textures.

elishacloud avatar May 19 '25 16:05 elishacloud

I added this option, but I changed the values because I think forcing both caps is the most common case. Here are the new values for SetPOW2Caps:

  1. = force both
  2. = force D3DPTEXTURECAPS_NONPOW2CONDITIONAL
  3. = force D3DPTEXTURECAPS_POW2
  4. = remove both

elishacloud avatar May 20 '25 00:05 elishacloud

Closing as this issue has been addressed.

elishacloud avatar Aug 30 '25 23:08 elishacloud

Thank you so much. this fixes a visual bug with the game Europa 1400

maci0 avatar Sep 05 '25 13:09 maci0

Thank you so much. this fixes a visual bug with the game Europa 1400

can you demonstrate?

Squall-Leonhart avatar Sep 05 '25 16:09 Squall-Leonhart

Image Image

using dxwrapper with the setting Image

here's the full breakdown of the bug and a patch we worked on.

https://github.com/muddykat-tech/Gold-Guild-Patch

maci0 avatar Sep 06 '25 03:09 maci0

this was also an issue when using wined3d implementation of d3d or even dxvk on linux+wine or even on native windows.

my current setup with dxwrapper for d3d8 -> d3d9 and then dxvk for d3d9 -> vulkan on linux with wine seems to work well. haven't tested natively on windows yet tho.

maci0 avatar Sep 06 '25 03:09 maci0

doin a bit of digging, the 4 listed caps are present on Geforce 4 and lower

Geforce 6+ do not have the conditional NPOT cap,

Squall-Leonhart avatar Sep 06 '25 13:09 Squall-Leonhart