Dx9cKiller
dx9cKiller is an experimental Direct3D 9 interceptor to dump/replace shaders and textures
Install / Use
/learn @ran-j/Dx9cKillerREADME
dx9cKiller
dx9cKiller is an experimental Direct3D 9 interceptor with a simple goal:
let you replace (mod) a game’s shaders and textures, and still make old FFP-only games work by auto-generating shaders for them.
It watches what the game does (render states, texture stages, transforms, lights, shader constants…) and then spits out HLSL for a vertex shader and a pixel shader. Along the way it can also notice when the game uses its own shaders and capture/restore constants around that.
This is not finished software but kind of works..
What it does (right now)
-
Hooks a D3D9 device and intercepts:
SetVertexShader/SetPixelShaderSetVertexShaderConstantF/SetPixelShaderConstantFSetTransform,SetRenderState,SetTextureStageState,SetSamplerState- texture bindings
- the main draw calls and many more
-
Generates FFP-like shaders on the fly
- generate shaders based on FFP calls
- binds the generated VS/PS instead of whatever DX9 would have done for FFP
- caches the result
-
Tracks textures and texture stages
- so the generated shader knows which stages are actually enabled
- and what the colour/alpha ops are supposed to do
- it also can dump and replace textures
Replacement flow
The repo supports a simple “drop-in replacement” approach:
- generated/dumped shaders and textures can be matched by a key/hash
- you can place custom shaders and texture under this folders:
replacements/vs/…replacements/ps/…replacements/tex/…dds
- at runtime, if a replacement with the expected name is found, the library will load that instead of the generated one
So: capture → dump → edit → replace.
The repo will list replacements on startup so if you change on the fly you will need to restart the game.
How to build (short)
- Open the solution/project in Visual Studio.
- Make sure the Direct3D 9 SDK (or Windows SDK with d3d9) is present.
- Build the DLL.
- Load it alongside your DX9 game.
Experimental warning
This is experimental code:
- it assumes a fairly normal D3D9 device vtable layout
- it assumes the game isn’t doing too many exotic things with constants
- it some time make wrong FFP translation
Contributing / reporting bugs
Grab the log and open an issue with:
- the game name
- the log around the draw
- and, if possible, what the effect should look like
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
