doitsujin / dxvk

Vulkan-based implementation of D3D8, 9, 10 and 11 for Linux / Wine
zlib License
13.4k stars 866 forks source link

White or blue glow issue in distant terrain and mountains in Train Simulator Classic with d3d9.dll (Vulkan renderer) #4425

Closed Pasic1994 closed 1 week ago

Pasic1994 commented 3 weeks ago

Hi!

I've been playing Train Simulator since 2014, now it's called Train Simulator Classic. In the game, I use the Armstrong Powerhouse weather pack which you can find below: https://www.armstrongpowerhouse.com/enhancements/general/sky_weather_enhancement_pack_2.0

This pack aside, for a while I had an issue with ugly black mountains and terrain in the distance, here are two pictures to illustrate what it looked like:

IMG_20200823_131753790_autoscaled

20211211011801_1

Then last year on a forum, someone suggested I install d3d9.dll (Vulcan renderer) to fix this black distant terrain issue and it was fixed.

This is what this view looks like from the same angle with d3d9.dll installed: 2024-05-19 19_44_43-Train Simulator (x64)-min

However, d3d9.dll created a new issue, now I have a white or blue glow in distant terrain on mountain or hill tops but also around some buildings, catenary wires and trees especially in snow weather. This white or blue glow is only an issue in foggy, rainy or snowy weather.

I put some pictures below of what it looks like on a route in winter weather but I have the same issue on other mountainous routes in similar weather (rain, fog, snowfall). I checked with Armstrong Powerhouse, they say that there is nothing wrong with their weather pack and this is a shader (Vulcan renderer) issue.

20241027191204_1 20241027191157_1 20241027191439_1

And here's 2 pictures in rainy weather:

20241030212414_1 20241030212419_1

I tried several things to get rid of this issue like verifying the integrity of the game files and uninstalling then reinstalling the game but to no avail.

Could you please help me out?

System information

Blisto91 commented 3 weeks ago

Hi there. Try to make a apitrace of the game if able. Also post the dxvk d3d9 log that appears next to the exe.

Pasic1994 commented 3 weeks ago

Hi there. Try to make a apitrace of the game if able. Also post the dxvk d3d9 log that appears next to the exe.

I don't know how to make a apitrace of the game, I have never done that before.

There is no log for the dxvk d3d9 that appears next to the exe, it's just a single .dll file that, when installed, gets rid of the black distant terrain issue but also introduces the glow on mountains issue.

Blisto91 commented 3 weeks ago

I don't know how to make a apitrace of the game, I have never done that before.

https://github.com/doitsujin/dxvk/wiki/Using-Apitrace Just replace the d3d9 dll and do what you would normally do to reproduce the issue (it won't show but we will replay with dxvk)

There is no log for the dxvk d3d9 that appears next to the exe

A log should appear somewhere in the games folder if dxvk is being used.

Pasic1994 commented 3 weeks ago

I don't know how to make a apitrace of the game, I have never done that before.

https://github.com/doitsujin/dxvk/wiki/Using-Apitrace Just replace the d3d9 dll and do what you would normally do to reproduce the issue (it won't show but we will replay with dxvk)

There is no log for the dxvk d3d9 that appears next to the exe

A log should appear somewhere in the games folder if dxvk is being used.

RailWorks64_d3d9.log

Is this the log you were refering to? ^

I followed the instructions and copy-pasted the needed .dll files next to the exe in the game. It manages to fix the white glow issue BUT it slows down the game significantly overall...

mbriar commented 3 weeks ago

It fixes the glow because you're not using dxvk anymore when adding the apitrace dlls and the slowdown is expected. You're supposed to play the game until you reach the spot where the issue would occur with dxvk, close the game, and upload the trace file found on your desktop afterwards here.

Pasic1994 commented 3 weeks ago

Yes that's what I did ^^ I can't really play the game properly either way because it's too slow now. I also can't 'reach the spot where the issue would occur with dxvk' because it occurs right away when I choose certain weather settings, it's not about reaching a spot.

mbriar commented 3 weeks ago

If the issue appears right away, even better. Just choose those weather settings with apitrace active and upload the trace.

Pasic1994 commented 3 weeks ago

If the issue appears right away, even better. Just choose those weather settings with apitrace active and upload the trace.

Isn't apitrace this log which I've uploaded? RailWorks64_d3d9.log

mbriar commented 3 weeks ago

No, with the apitrace dlls copied next to the game's .exe, it will create a (large) .trace file on your desktop after running the game. Upload that to some file hosting service and post a link.

Pasic1994 commented 3 weeks ago

It did create a large .trace file on my desktop after running the game, I just wasn't able to extract and open it with 7-zip or anything and then upload it here.

mbriar commented 3 weeks ago

Just upload it as is.

Pasic1994 commented 3 weeks ago

Just upload it as is.

It's telling me 'we don't support that file type', I have to upload it in another format but I don't know which one to pick.

mbriar commented 3 weeks ago

It's going to be too large to upload it direct to github anyways, you'll have to use a 3rd party service like google drive. You can also compress the .trace file to a .zip.

Pasic1994 commented 3 weeks ago

Would you or someone else be able to open the .trace file though if I compress it to a .zip? If not, I will upload it as a Google Drive link.

mbriar commented 3 weeks ago

Yes, it's no problem to open it. But even compressed to a .zip it's going to be too large to upload to github directly and you'll need to use google drive.

Pasic1994 commented 3 weeks ago

https://drive.google.com/file/d/1tD692Fuz3LjJTFl_7LrAzOxM2H7SscRL/view?usp=drive_link

There you go, please let me know if it works ;)

mbriar commented 3 weeks ago

You have to set the sharing option for the link in google drive to 'public'.

Pasic1994 commented 3 weeks ago

Done :)

mbriar commented 3 weeks ago

The trace works and seems to reproduce the issue.

Pasic1994 commented 3 weeks ago

Ok so what's the next step now?

mbriar commented 3 weeks ago

Some actual DXVK developer needs to take a look at it. Just noting that for some reason the trace fails to replay with wined3d and nine (nothing @Pasic1994 can do anything about).

Pasic1994 commented 3 weeks ago

Some actual DXVK developer needs to take a look at it. Just noting that for some reason the trace fails to replay with wined3d and nine (nothing @Pasic1994 can do anything about).

Ok then but do we have some actual DXVK developers here that can assist or do I have to find one and contact them individually?

Blisto91 commented 3 weeks ago

Yes this is the official dxvk issue tracker. No need to find anyone.

Pasic1994 commented 3 weeks ago

Yes this is the official dxvk issue tracker. No need to find anyone.

So then I just have to wait for an actual DXVK developer to see this and read everything?

mbriar commented 3 weeks ago

yes

Blisto91 commented 3 weeks ago

Thank you for the trace. Sadly this is again a thing that regressed back in commit https://github.com/doitsujin/dxvk/commit/65635b23c1e8575362722c99e6ffdf9d9df64116 and isn't a problem that is simple to solve correctly. (that i know of)

Pasic1994 commented 3 weeks ago

Thank you for the trace. Sadly this is again a thing that regressed back in commit 65635b2 and isn't a problem that is simple to solve correctly. (that i know of)

Are you a developer? What's commit 65635b2?

Blisto91 commented 3 weeks ago

No i am a tester. That commit is the piece of code work that introduced the issue.

Pasic1994 commented 3 weeks ago

No i am a tester. That commit is the piece of code work that introduced the issue.

And the piece of code cannot be removed?

Blisto91 commented 3 weeks ago

Not just like that no. At least without breaking some other game.

Pasic1994 commented 3 weeks ago

So I guess nothing can be done then? Unless a developer sees this and responds with a solution.