protonscr

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

dxvkclosed
doitsujin/dxvk#4425 · opened 2024-11-02 by Pasic1994 · updated 2024-11-18 · 31 comments · github
PPasic1994 2024-11-02 github

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

BBlisto91 2024-11-02 github

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

PPasic1994 2024-11-03 github

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.

BBlisto91 2024-11-03 github

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.

PPasic1994 2024-11-03 github

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...

Mmbriar 2024-11-03 github

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.

PPasic1994 2024-11-03 github

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.

Mmbriar 2024-11-03 github

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

PPasic1994 2024-11-03 github

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

Mmbriar 2024-11-03 github

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.

PPasic1994 2024-11-03 github

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.

Mmbriar 2024-11-03 github

Just upload it as is.

PPasic1994 2024-11-03 github

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.

Mmbriar 2024-11-03 github

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.

PPasic1994 2024-11-03 github

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.

Mmbriar 2024-11-03 github

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.

PPasic1994 2024-11-03 github
Mmbriar 2024-11-03 github

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

PPasic1994 2024-11-03 github

Done :)

Mmbriar 2024-11-03 github

The trace works and seems to reproduce the issue.

PPasic1994 2024-11-03 github

Ok so what's the next step now?

Mmbriar 2024-11-04 github

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).

PPasic1994 2024-11-04 github

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?

BBlisto91 2024-11-04 github

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

PPasic1994 2024-11-04 github

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?

Mmbriar 2024-11-04 github

yes

BBlisto91 2024-11-04 github

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)

PPasic1994 2024-11-04 github

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?

BBlisto91 2024-11-04 github

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

PPasic1994 2024-11-04 github

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?

BBlisto91 2024-11-04 github

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

PPasic1994 2024-11-04 github

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

DLLs