VOGONS


First post, by Ichisich

User metadata
Rank Newbie
Rank
Newbie

As, it is currently free on Steam: https://store.steampowered.com/app/29900/Dark_Sector/

How it looks natively:
uv8e2dp.png

How it looks with DgVoodoo2:
3OLuXzs.png

I tried multiple DgVoodoo2 versions, and it seems to be no regression bug.
DirectX11 and 12 produce the same result.
Settings are kept on default, but I also tried tinkering with some and the flashlight bug is consistent.

OS: Windows 10
GPU: AMD RX 580 (Polaris) with the latest driver 24.9.1

Reply 1 of 3, by Dege

User metadata
Rank l33t
Rank
l33t

It's a real mystery for me... By the API calls and sampler parameters the game drives dgVoodoo, the flashlight should be repeated, as the case is.
There is no difference in the API driving with native D3D9 and it appears correctly with that...
Flashlight is a projected texture but the texture itself is sampled with address mode 'wrap', instead of 'clamp'. But I cannot understand how the (projected) texture coordinates can get clamped int0 [0..1] with 'wrap'.

Reply 2 of 3, by Ichisich

User metadata
Rank Newbie
Rank
Newbie

It's not really conveyed by the game, but the flashlight is supposed to be emitted by the glaive weapon.
Throwing the glaive, while the flashlight is active, switches the projected transparent texture into a dynamic light that follows the glaive.

My guess is either that Digital Extreme originally concepted the flashlight to be 360° which would be more aligned with the weapon design and changed it last minute with some questionable code that somehow works, or the original flashlight was a constant dynamic light around the glaive and the switch from constant dynamic light to projected transparent texture is again just a last minute redesign with some questionable code that somehow works.

The port in itself seems to be held barely together with duct tape. Resolution changing, or alt-tabbing, pushes the system into pure chaos and widescreen resolutions clinch the aspect ratio.
It's fixable in the config files, but every half decent port shouldn't have those problems.
There is probably no easy fix. Your wrapper interprets the call correctly, but the game expects some shenanigans to work.

Reply 3 of 3, by Dege

User metadata
Rank l33t
Rank
l33t

I don't really know the quality of the port. 😀 But anyway the question is why the rendering works natively.

Each texture has a texture sampler mode in the game asset, and the flashlight texture has a 'texture address wrap' sampler type. If I modify it to the expected 'clamp' in the memory from the debugger then flashlight is ok.
So, one of the possible (workaround) fixes would be finding that byte in the game data files and modify it there.