Welcome, Guest.
Username: Password: Remember me

TOPIC: [SOLVED] nGlide + ReShade

nGlide + ReShade 1 year 7 months ago #1

  • Zeus
  • Zeus's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
Hi Crosire,

it's Zeus, nGlide developer.
Recently I received couple reports that our programs don't work together (crash to desktop).

nGlide is a 3Dfx Glide API wrapper to Direct3D 9 so maybe one of IDirect3DDevice9 methods is unimplemented or something...

Could you please take a look?

I created a test package here:
www.zeus-software.com/files/nglide/nglide_reshade_test.zip

All you have to do is to launch test25.exe and see if it ctd (it does with my Radeon HD 5670 and Win7 x64/Win8.1 x64).

Let me know if you'll need some more info.
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #2

  • Kleio420
  • Kleio420's Avatar
  • Offline
  • Posts: 223
  • Thank you received: 28
Zeus wrote:
Hi Crosire,

it's Zeus, nGlide developer.
Recently I received couple reports that our programs don't work together (crash to desktop).

nGlide is a 3Dfx Glide API wrapper to Direct3D 9 so maybe one of IDirect3DDevice9 methods is unimplemented or something...

Could you please take a look?

I created a test package here:
www.zeus-software.com/files/nglide/nglide_reshade_test.zip

All you have to do is to launch test25.exe and see if it ctd (it does with my Radeon HD 5670 and Win7 x64/Win8.1 x64).

Let me know if you'll need some more info.
yea cause this doesnt scream out virus right now seriously
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #3

  • piltrafus
  • piltrafus's Avatar
  • Offline
  • Posts: 78
  • Thank you received: 15
Dear Kleio,
is often good doing some research before going around throwing wild accusations.
www.zeus-software.com/downloads/nglide
Mr Zeus, very much like Mr Crosire here, has been providing gamers with great tools to improve our favorite games. for free.

I personally would love to see Nglide and Reshade working better together.
Regards.
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #4

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2536
  • Thank you received: 1452
Zeus wrote:
Let me know if you'll need some more info.
Hi =)

I was able to run the test without crash and all features working on a NVIDIA GeForce GTX540M and a GeForce GTX970, both with Windows 7 64bit.

Is it possible to narrow down the crash position? By attaching a debugger and with debug symbols for NGlide and the test app the stacktrace should provide some useful information.
Cheers, crosire =)
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #5

  • Zeus
  • Zeus's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
Ok, I debugged the issue and here's what I found:

D3D9 devices created with a D3DCREATE_SOFTWARE_VERTEXPROCESSING or D3DCREATE_HARDWARE_VERTEXPROCESSING flag work properly in conjunction with ReShade.

ReShade will cause a crash if the device will be created with a D3DCREATE_MIXED_VERTEXPROCESSING flag (a mode that allows switching between SWVP and HWVP at runtime without recreating the device) and if vertex processing will be switched to SWVP by calling IDirect3DDevice9->SetSoftwareVertexProcessing(TRUE).

The crash occurs at system d3d9.dll:IDirect3DDevice9->DrawPrimitive(), which is called by ReShade at 0x100AC8D0 (0.19.2). 0x100AC8D0 is part of ReShade's IDirect3DDevice9->Present().

This explains why you didn't have a crash with GeForce cards as they don't require D3DUSAGE_SOFTWAREPROCESSING flag when creating vertex buffers for mixed mode devices after switching to SWVP (Radeons do!).

I updated test package and instead of nGlide I included DXSDK9 vertices sample along with pdb and source code so now it should be easier to debug in case you'll still need it.

But the fix should be easy. Monitor whether vertex processing has been set to software by CreateDevice() or SetSoftwareVertexProcessing(TRUE) and if that's the case set D3DUSAGE_SOFTWAREPROCESSING flag when creating vertex buffer for your additional DrawPrimitive call in IDirect3DDevice9->Present() (ReShade overlay?).

Another question I have is that intentional that right half of the screen is black with default ReShade package?
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #6

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2536
  • Thank you received: 1452
It still doesn't crash for me, but the drawing fails at least.

If I may ask, I'm wondering why you use software vertex processing? It's very slow and basically every computer supports hardware vertex processing these days (even if they don't have a separate GPU, modern CPUs have onboard graphics units). So I'm thinking about simply forcing it instead.

Zeus wrote:
Another question I have is that intentional that right half of the screen is black with default ReShade package?
The core package only contains an example shader, which fills the right half of the screen with the depth buffer content (see ReShade.fx).
Cheers, crosire =)
Last Edit: 1 year 7 months ago by crosire.
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #7

  • Zeus
  • Zeus's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
crosire wrote:
I'm wondering why you use software vertex processing? It's very slow and basically every computer supports hardware vertex processing these days (even if they don't have a separate GPU, modern CPUs have onboard graphics units).
Radeons do not support primitive clipping so the fastest method to clip them with this hardware is to switch to SWVP. Performance wise, there is no difference as a typical scene in a Glide API game consists of no more than 10k triangles (already pre-transformed verts).

crosire wrote:
So I'm thinking about simply forcing it instead.
Setting D3DUSAGE_SOFTWAREPROCESSING flag for CreateVertexBuffer() for programs that already use SWVP should have zero impact on performance. No matter if you set 0 or D3DUSAGE_SOFTWAREPROCESSING, the vertices will be processed in software. The only difference is the program won't crash. You won't be setting this flag for HWVP, so I'm suggesting trying this option first.

Forcing HWVP should also fix the crash, it's just the clipping won't work on AMD hardware.

crosire wrote:
The core package only contains an example shader, which fills the right half of the screen with the depth buffer content (see ReShade.fx).
Ok, thanks.
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #8

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2536
  • Thank you received: 1452
I need ReShade to use hardware rendering, because the shaders can get quite complex. For that reason I now simply turn off software vertex processing before ReShade kicks in and turn it back on afterwards (if it was enabled before). And to get support for switching the D3DCREATE_SOFTWARE_VERTEXPROCESSING flag is replaced with D3DCREATE_MIXED_VERTEXPROCESSING on device creation if specified. Seems to work.
Cheers, crosire =)
The administrator has disabled public write access.

nGlide + ReShade 1 year 7 months ago #9

  • Zeus
  • Zeus's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
Excellent idea. Will be waiting for the next release.

Thanks again.
The administrator has disabled public write access.

nGlide + ReShade 1 year 6 months ago #10

  • crosire
  • crosire's Avatar
  • Offline
  • Posts: 2536
  • Thank you received: 1452
This should no longer be an issue with version 1.0.
Cheers, crosire =)
The administrator has disabled public write access.
The following user(s) said Thank You: Zeus

nGlide + ReShade 1 year 5 months ago #11

  • Zeus
  • Zeus's Avatar
  • Offline
  • Posts: 5
  • Thank you received: 1
Tested new version today and I can confirm it works properly. :)
The administrator has disabled public write access.
The following user(s) said Thank You: crosire