cd /news/developer-tools/d3dasm-d3dasm-direct3d-shader-toolin… · home › topics › developer-tools › article
[ARTICLE · art-166434] src=reversedwithai.com ↗ pub= topic=developer-tools verified=true sentiment=↑ positive

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.

by read1 min views20 publishedNov 5, 2026
d3dasm: d3dasm Direct3D Shader Tooling
Image: Reversedwithai (auto-discovered)

Evidence at a glance #

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 -- <shader.bin>

Community #

Ask a question, share what worked, or follow the next milestone.

Your library

── more in #developer-tools 4 stories · sorted by recency
── more on @d3dasm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/d3dasm-d3dasm-direct…] indexed:0 read:1min 2026-11-05 · —