Sign in to follow this  

Need help converting a d3d9 shader to d3d8

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently working on modifying a directx9 shader effect plugin to work with a directx8 game. I'd just like to get this accomplished and quit; I'm more comfortable with Texturing than coding. In all honesty, I don't know C++. All I know is rudimentary Java. I've installed Visual Studio C++ Express and the DX9 SDK for use with this project. I do have the sourcer code for the plugin available to work with. How the plugin works is this: (I don't know what I'm talking about here.) 1) A file named d3d9.dll placed inside the main game folder intercepts graphics requests. 2) Said file adds a fullscreen shader model 2.0 HDR effect. (not sure as to progression here) 3) The .dll returns a fake device to the game's main executable file. That's how I understand it, at least. The author of the plugin is busy, and doesn't have time to teach/help a graphics newb adapt it. He did, however, give me the following advice: "[the dx9 plugin]might already work, and it'll make a good base to start with even if freelancer was DX8. Wrapping the graphics device and applying a shader each frame is fairly easy to do." The components of the source were these: A d3d9header source file, which seems fairly straightforward even if I have no idea what it does; an exports definition file; and a source file named GenericHDR. I've heard that d3d9 and d3d8 are almost identical. I have the dx9 sdk from nvidia, and I've heard that it can be used to compile d3d8 code if certain options are selected. Would it be reasonable to assume that all methods used are the same? Should I simply change the number 9 to the number 8 every time I see it? Would I need to leave the actual shader in dx9 format due to compatability issues (such as dx8 not supporting sm2.0 effects)? Could I just change the header, exports, and names; leaving everything else intact? Would you need a link to the source download (I'll post it if asked, as it is public) in order to help? [Edited by - Blue Shift on December 5, 2007 3:08:03 PM]

Share this post


Link to post
Share on other sites

This topic is 3664 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this