Skip to content
Radek Dutkiewicz edited this page Apr 4, 2016 · 2 revisions

To replace a game's texture with your own one from file the following lines need to be added to the d3dx.ini

[ResourceReplaceTexture1]
filename = ReplacementTextures\foo.jpg

Match a shader used to draw the texture to be replaced (can match VS or PS) and use checktextureoverride on the texture slot with the texture to be replaced, which will enable certain commands in the TextureOverride section

[ShaderOverride1]
Hash = xxx
checktextureoverride = ps-t0

The TextureOverride matches the texture to be replaced, and will replace the texture in pixel shader texture slot 0 (ps-t0) with the custom resource. The ps-t0 line will only be run if checktextureoverride was used to match this texture from a ShaderOverride section (for performance reasons)

[TextureOverride1]
Hash = yyy
ps-t0 = ResourceReplaceTexture1

The hash of a texture (yyy) can be found in the ShaderUsage.txt or in the filename of a texture dumped by executing the frame analysis with the analyse_options set to one of the dump_tex_* values