Is it possible to decompile a .xnb file? I've lost my shader code, but only have my .xnb file left.
|
|
It's unlikely you'll be able to retrieve the source from the xnb file as it has undergone compilation into a binary format during the XNA pipeline stages. While it's theoretically not impossible, in my opinion you'd probably be much better off rewriting the shader.. |
|||
|
|
|
The best you can get is a disassembly, which may help you recreate the source code. (Unless someone can point you to an actual HLSL decompiler. I've never seen one.) If you happen to be using XNA 3.1 you could simply load it into an XNA 4.0 removes this - so it will be much harder: First of all you need the actual effect data. Probably the easiest way to get it would be to use reflection to get access to the private Once you have the binary data, you'll want to disassemble it. I can't figure out a way to use |
|||||
|
|
http://mirror.dataorb.net/XNB_Exporter.zip - Maybe this can help you. |
|||||||||
|