DDRAW and Shader Model

Want to edit the game, build your own craft and missions? Here you'll find help, tools, guides and people to discuss with.
Post Reply

DDRAW and Shader Model

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Fri Apr 13, 2018 6:43 am

Hello

I am working fixing the game in order to make it compatible with 3DVision. The game offers one of the best immersive experiences in 3D, specially with XWAUP, but there are some problems that need to be fixed, first. I have already fixed HUD text and other things are being fixed too.

I (and other people) are using 3DMigoto to fix it (tool to edit shaders in DX11) but there is a problem. It seems that DDRAW uses Shader Model 2 (correct me if I am wrong) as the shader dumps say that. The problem is that in order to have a chance to fix the problems, 3DMigoto (to inject back the fixed shaders) needs to work at least in Shader Model 3 or above. So I would like to know, first if I understand it correctly regarding ddraw and so if there is some chance to upgrade ddraw to a more recent SM.

Of course I have the chance to delete ddraw and use dgVoodoo, which use SM4, but this wrapper is very picky, prone to make glitches, not optimized for XWA, and do not respect some things that ddraw do (like aspect ratio, CPU or freq, etc). And moreover, ddraw is much smoother and reliable (I really don't see people using dgVoodoo with XWA. And I don't like it at all).

Just in case, here there is a tool to automatically convert from SM2 to SM3, is a python script https://helixmod.blogspot.com.es/2017/0 ... -sm30.html, don't know if it could be of help.

Thanks!

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Apr 13, 2018 11:58 am

Hello,
The source code of the DX11 DDraw.dll is on GitHub: So you can modify the shaders code and recompile the dll.

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Fri Apr 13, 2018 12:39 pm

Thanks. Should I only modify the "shaders" 's folder content? I mean, is this the only part shader related?

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Fri Apr 13, 2018 12:44 pm

Yes. And in DeviceResources.cpp there is the code that load the shaders.

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Sat Apr 14, 2018 8:05 am

Thank you for the tips.

Unhappily, after looking into it, I don't have the enough programming skills to do it myself. I would not mind to learn, but my 3D gaming fixing fills my scarce free time, and I'm afraid I don't see availability to plunge into programming as needed for now, so I guess I have hit a wall. dgVoodoo is not an option (interferes with other shaders, and is unplayable in menus) so I'll drop this one and switch to fix other games.

Thank you anyway!

User avatar
Darksaber
Vice Admiral
Posts: 10931
Joined: Mon Jan 10, 2000 12:01 am
Contact:

Post by Darksaber » Sat Apr 14, 2018 10:15 am

:?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”.”
- John Lydgate

Good Things Come To Those Who Wait....
Darksaber's X-Wing Station

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Sat Apr 14, 2018 10:48 am

Not sure what you mean...but just in case: I wanted only to clarify that I would not be working on this more, just so nobody was hoping (and waiting) for the 3D fix. Please, tell me if I have not understood correctly your post ;)

User avatar
JeremyaFr
XWAU Member
Posts: 3922
Joined: Mon Jan 18, 2010 5:52 pm
Contact:

Post by JeremyaFr » Sat Apr 14, 2018 11:51 am

Hello,
Here is DDraw.dll version 1.3.2 recompiled to use Shader Model 4:
xwa_ddraw_d3d11.1.3.2_sm4.zip
Last edited by JeremyaFr on Fri Oct 19, 2018 7:07 pm, edited 1 time in total.

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Sat Apr 14, 2018 12:08 pm

Hey! thanks a lot! I am going to work & tweak with it right now.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sat Apr 14, 2018 10:08 pm

Hi Darkblue, regarding the "3DVision" for the purpose of this post... are you referring to the application of using one of those Virtual-Reality head gear things? I know there are three different types on the market. I plead ignorance, just asking. Thanks
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Sun Apr 15, 2018 5:57 pm

Hi. In fact I mean gaming in 3D (stereoscopy) with 3D glasses and a monitor capable of 3D (120Hz of refresh or more) with the set (drivers, glasses and monitor) of Nvidia, known as 3DVision. It is not VR, but it is likely that it would work once the game has been fixed to work/show correctly in stereoscopy (3D).

Currently it has some glitches/problems that are visible when run in 3D/stereoscopy mode. Of course as you say, each type VR headset will/could have its specifications, so it is not granted that it 'd work in VR even if it'd do fine in 3D. Will see.

Bman
Lieutenant Commander
Posts: 1167
Joined: Mon Apr 05, 2004 11:01 pm

Post by Bman » Sun Apr 15, 2018 6:39 pm

Nice. b/t/w, does it work with using the Reshade Project files ? :D
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.

Darkblue
Cadet 2nd Class
Posts: 96
Joined: Sun Mar 09, 2003 12:01 am

Post by Darkblue » Sun Apr 15, 2018 6:45 pm

Yes! I have done some profiles with the new Reshade 3 (this is also a factor to use ddraw instead of dgVoodoo), and I am testing 3D with them. For me, together with 3D (I hope to fix some remaining problems...) is a very very nice experience.

Post Reply