PARTYMANX / partymod-thps4

MIT License
23 stars 0 forks source link

Option for disabling windowed gamma #7

Open ZT-1 opened 9 months ago

ZT-1 commented 9 months ago

Is there a way to also have a toggle for disabling gamma in windowed mode? I don't believe the game is supposed to look that bright and it seems like an issue by Beenox.

Xbox xemu_FP4ZuRiuk5 PC THPS4_GoyDfDQf1l

Disabling gamma seems to be the incorrect option as it looks a lot brighter than consoles.

PARTYMANX commented 9 months ago

There needs to be a different approach for gamma implemented. The gamma that was used in fullscreen just doesn't work at all in windowed mode (and the gamma often breaks and sticks around too long after closing the game in fullscreen, so i added the option to disable it)

PARTYMANX commented 9 months ago

I did some more looking into it and there doesn't seem to be any way of setting gamma in a windowed d3d8 program. I was a little hopeful looking at dxvk/d8vk as a workaround (they implement the correction as a shader which would make it compatible with windowing), but they also exhibit the correct behavior of disabling gamma correction in windowed. So that means the only choice would to be to convert the renderer to use a more modern API and reimplement the gamma correction as a shader which would be a massive endeavor.

ks202005 commented 9 months ago

I did some more looking into it and there doesn't seem to be any way of setting gamma in a windowed d3d8 program. I was a little hopeful looking at dxvk/d8vk as a workaround (they implement the correction as a shader which would make it compatible with windowing), but they also exhibit the correct behavior of disabling gamma correction in windowed. So that means the only choice would to be to convert the renderer to use a more modern API and reimplement the gamma correction as a shader which would be a massive endeavor.

Would using d3d8to9 be an option? ReShade can work with DirectX 9, and the [their site says that ReShade works with d3d8to9).

PARTYMANX commented 9 months ago

the call would most likely be directly translated to IDirect3DDevice9::SetGammaRamp, which has the same behavior. you could of course use reshade on your own to implement your own gamma correction, but it's not the self-contained solution i'd be looking for.