Jump to content
  • Advertisement
Sign in to follow this  
Yarin

Decompile Cg shaders?

This topic is 4854 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

Hey everbody, I have some shaders here, their file extension is fx so I tried to open them with the shader editor from the DX SDK. Didn't work as the file content was binary. They all start with:
235B 0702 6367   #[..cg
So I think this could be a cg shader. Is this right? Now my question: Is there are way to decompile / modify this shaders? I have no illegal aims, I just want to mod the game (Battlefield 2) that uses this shaders. Thanks in advance, Yarin

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Optus
Actually, .fx is the file name extension for Nvidia's FX Composer Cg authoring software.


Correction: FX Composer isn't Cg authoring software, it's Microsoft's FX (effect)- file authoring software. I think it still could be used to author CgFX files.

I don't know what shaders Battlefield 2 uses, but solely judging by the file extension, those could be either Microsoft's effects, CgFX files, or even BF2's custom format. Either way, they are compiled, and I don't know if there's any way to decompile them.

Btw, if you are just modding BF2, you shouldn't have any need to modify shaders. I haven't used BF2 SDK, but if they allow custom shaders, there should be some documentation about making them.

Share this post


Link to post
Share on other sites
Back-engineering shaders is bad for a multiplayer game's security, because a savvy player could then trick the engine rendering pipeline, and take advantage of it (by making the walls transparent, for example)...

So I wouldnt be surprised if they took extra steps to secure it.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!