d3dasm: d3dasm Direct3D Shader Tooling A Rust-based suite called d3dasm parses, modifies and recompiles Direct3D DXBC shader containers losslessly, with round-trip verification against 1,152 real-world shader chunks reporting zero failures and 100% byte-exact reconstruction. The project decodes SM4/SM5 bytecode into a typed intermediate representation and produces fxc.exe-compatible disassembly, and includes an HLSL decompiler built on cfglib that recovers SSA variables and structured control flow. Claude Opus 4.8 contributed to implementing byte-exact encoders for RDEF structures and signature blocks, though some compiler metadata remains irreducible in HLSL and requires inline annotations for byte-identical reassembly. Evidence at a glance Loading source evidence… What was done d3dasm provides a lossless, spec-accurate framework for parsing, modifying, and recompiling DXBC shader containers. It supports SM4/SM5 bytecode round-tripping and includes an HLSL decompiler built on cfglib. d3dasm is a Rust-based suite for Direct3D shader bytecode manipulation. It parses DXBC containers and decodes SM4/SM5 bytecode into a typed intermediate representation, producing fxc.exe -compatible disassembly. The project features a lossless round-trip capability, verified against 1,152 real-world shader chunks with zero failures. While published structures like RDEF and signatures are fully parsed, unknown payloads and specific chunks like ILDB or LIBH are preserved opaquely to ensure forward compatibility. The suite includes a decompiler that lifts bytecode into an HLSL-dialect RTL using cfglib, recovering SSA variables and structured control flow. Development involved significant contributions from Claude Opus 4.8, which assisted in implementing byte-exact encoders for RDEF structures and signature blocks. The tool successfully achieves 100% byte-exact reconstruction for the corpus, allowing for shader inspection and modification. Some compiler metadata remains irreducible in HLSL, requiring inline annotations to maintain byte-identical reassembly. Reproduce it cargo run --