iXit / wine-nine-standalone

Build Gallium Nine support on top of an existing WINE installation
GNU Lesser General Public License v2.1
272 stars 23 forks source link

Incorrect glass rendering on Halo: CE #98

Open Aerocatia opened 3 years ago

Aerocatia commented 3 years ago

This is likely due to the game doing undefined behaviour as the shader uses a mismatched image and sampler (iirc sampler is a cubemap but the image is a 2D texture)

Working: Screenshot_20210303_234553_working

Gallium Nine: Screenshot_20210303_234233_gallium_nine

Aerocatia commented 3 years ago

Unrelated but gallium nine has taken a massive performance hit in this game on recent WINE versions. I don't think the regression is in nine itself, so I'm not sure if it's worth opening an issue about it.

dungeon007 commented 3 years ago

"Unrelated but gallium nine has taken a massive performance hit in this game on recent WINE versions." Open it, that could be interesting, if you know on which WINE version that massive performance hit started.

dungeon007 commented 3 years ago

Seems like that glass shader is working with ForceShader=14 in config.txt or -use14 switch, -use11 draws it too. At least on Radeon hardware that seems working, just not with default again so -use20. Neither wined3d draws that as i see 🤣

Aerocatia commented 3 years ago

wine3d does not account for this case, neither do modern Windows drivers. Using a lower pixel shader version is also not entirely working as it uses a different shader path that breaks numerous other things.

The Glass only renders correctly on ~2003 ATI drivers, or on modern cards using dgVoodo2 or DXVK.

dungeon007 commented 3 years ago

On the other hand dxvk seems to draw that via either radv or amdvlk with -use20 too, so yeah a bug.

dungeon007 commented 3 years ago

That is something really BAD, if it does not work on any driver 🤣

Aerocatia commented 3 years ago

Yeah DXVK already has a specific check to handle this exact issue in this game, so it works on there.

axeldavy commented 3 years ago

I guess at some point we'll need to implement the same kind of game hacks DXVK does.

Aerocatia commented 3 years ago

Yeah, unfortunately. I friend of mine tried to find a fix for this client side so it could be done in Chimera, but could not find the right thing to patch.