Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] Kerbal Space Program 0.90 [Unity Engine]

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #1

First of all thank you guys! Been playing KSP with reshade+sweetfx for several hours and it's been great fun.

I ran Reshade Setup on the game and it seems to work out of the box. In the (standard) D3D9 mode. Even 8xAA works! \o/

Funny enough it auto-detects opengl and puts the dll as opengl32.dll in the game folder, but the game crashes when I start it in OpenGL mode (calling it with the switch -force-opengl). It crashes at startup with an error message, writes a opengl32.log and unity crash messages. I tried to kill all processes and services that might do any overlays that might conflict with OpenGL but still no joy. Also tried loading without the sweet.fx file present.

OpenGL mode in KSP is obviously a bit weird if d3d9 works fine, but many people use it because it frees up about a gig of ram and therefore avoids crashes. For players who play it with many mods it's the better alternative to the buggy 64 bit version of the game.

Unity also offers a dx11 mode (-force-d3d11) which I couldn't get to work with reshade either.

Any ideas what I could try to get it to work? I'm kinda new to this :)

Reshade 0.13.2.668
GTX 750 Ti w/ 347.25 driver
Win 7 64
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #2

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
There's a problem with the OpenGL hook causing issues with Unity. This should be fixed with upcoming 0.13.4 =)
Cheers, crosire =)
Last Edit: 1 year 10 months ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: Kerbin Dallas Multipass

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #3

Thats awesome! tx :)

Little follow up question:

Shader@0x07198BE0(29,10): warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them

Is it a certain effect or setting thats throwing this?
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
It's a warning related to the shaderpack you are using. Don't worry about it.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: Kerbin Dallas Multipass

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #5

  • ozzy
  • ozzy's Avatar
  • Offline
  • Posts: 10
its working for me so far and the last time i tested was on 64bit Ksp.exe , opengl32.dll 440kb one

imgur.com/a/izOSO
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #6

@ozzy
Yea works fine for me in D3D mode as I stated. Did you try it with forced opengl?
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #7

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
I think I have to take back what I said earlier.
I know why it doesn't work under OpenGL with Unity: ReShade is creating its resources on the first call to "wglMakeCurrent", which then causes Unitys next call to "wglShareLists" to fail. One should never call them in this order, but unfortunately Unity does it anyway. Now delay loading would fix that, but that introduces a bug under Wolfenstein on AMD cards (works just fine on NVIDIA, it's fully spec conform, so I asume it's a driver bug, as they seem to be common with shared OpenGL contexts and AMD drivers).
Unity has a way to force Direct3D, Wolfenstein doesn't, so I have to delay it for now, until AMD manages to fix their stuff or I notice I made a serious mistake somewhere.
Cheers, crosire =)
Last Edit: 1 year 10 months ago by crosire.
The administrator has disabled public write access.
The following user(s) said Thank You: ozzy

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #8

  • ozzy
  • ozzy's Avatar
  • Offline
  • Posts: 10
Kerbin Dallas Multipass wrote:
@ozzy
Yea works fine for me in D3D mode as I stated. Did you try it with forced opengl?

Really sorry, i thought my game was on Opengl. But somehow Opengl32.dll (64bit) worked with 64bit KSP on d3d9. Checked with RTSS and it showed d3d9 and reshade works with opengl32.dll 64bit. I am just a noob sorry :p
Last Edit: 1 year 10 months ago by ozzy.
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 10 months ago #9

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
"opengl32.dll" works, because the Unity3D engine loads it anyway, no matter if started in D3D or OpenGL mode. ReShade doesn't care how it is called, once loaded it is able to hook in all cases. =)
Cheers, crosire =)
The administrator has disabled public write access.

Kerbal Space Program 0.90 [Unity Engine] 1 year 8 months ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2453
  • Thank you received: 1393
Should be fixed with 0.16.0 too.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: Kerbin Dallas Multipass