Jump to content
  • Advertisement
Sign in to follow this  
_zed

Decoding shaders

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

How can I decode shaders written in HLSL? I searched much but didn't find any information.

Share this post


Link to post
Share on other sites
Advertisement
Decode? What? If they're in HLSL, then the syntax is more or less the same as C, and is pretty well documented.

Are you trying to reverse engineer ASM shaders into HLSL?

I'm confused.

Share this post


Link to post
Share on other sites
Sorry. A hava incorrectly written the question.
I want to decode compiled shaders into HLSL or into asm.

P.S.: sorry for my bad English. :)

Share this post


Link to post
Share on other sites
As far as I know, ther eis no way of turning byte code into the actual high level code used to create it.

Share this post


Link to post
Share on other sites
The "Shader Binary Format" page in the SDK 2004 documentation says:
Quote:
The bitwise layout of the shader instruction stream is defined in D3d9types.h. If you want to design your own shader compiler or construction tools and you want more information about the shader token stream, refer to the DirectX 9.0 Driver Development Kit (DDK).


Anyway, the fxc, vsa and psa compilers can output asm + hex listing when you use the /Fx option. Perhaps you can use that to further understand the binary format.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!