I've been trying to find a way to decompile some shaders from Sonic Adventure 2's PC port, and while this program seems to work for some of its shaders, it appears to crash for one with the following exception:
C:\source\repos\HlslDecompiler\bin\Debug>HlslDecompiler.exe sonicvs.wvu
Writing sonicvs.asm
Loop
Unhandled Exception: System.NotImplementedException: The method or operation is not implemented.
at HlslDecompiler.DirectXShaderModel.Instruction.GetParamRegisterName(Int32 index) in C:\Source\Repos\HlslDecompiler\DirectXShaderModel\Instruction.cs:line 247
at HlslDecompiler.DirectXShaderModel.AsmWriter.GetSourceName(Instruction instruction, Int32 srcIndex) in C:\Source\Repos\HlslDecompiler\DirectXShaderModel\AsmWriter.cs:line 90
at HlslDecompiler.DirectXShaderModel.AsmWriter.WriteInstruction(Instruction instruction) in C:\Source\Repos\HlslDecompiler\DirectXShaderModel\AsmWriter.cs:line 158
at HlslDecompiler.DirectXShaderModel.AsmWriter.Write(String asmFilename) in C:\Source\Repos\HlslDecompiler\DirectXShaderModel\AsmWriter.cs:line 105
at HlslDecompiler.Program.ReadShaderModel(String baseFilename, FileStream inputStream, Boolean doAstAnalysis) in C:\Source\Repos\HlslDecompiler\Program.cs:line 49
at HlslDecompiler.Program.Main(String[] args) in C:\Source\Repos\HlslDecompiler\Program.cs:line 26
The resulting assembly listing file is blank and no shader source file is produced.
I've attached a zip folder with the shader and its proper assembly listing generated by FXC from the Visual Studio 2019 Developer Command Prompt:
sonicvs.zip
I've been trying to find a way to decompile some shaders from Sonic Adventure 2's PC port, and while this program seems to work for some of its shaders, it appears to crash for one with the following exception:
The resulting assembly listing file is blank and no shader source file is produced.
I've attached a zip folder with the shader and its proper assembly listing generated by FXC from the Visual Studio 2019 Developer Command Prompt:
sonicvs.zip