scripts/dx2cg
CakeLancelot d5b58d96da dx2cg: Implement RECT, CUBE texture types
Also tried to implement 3D texture type, but that will likely require a few other instructions to get working - namely texldp and dcl_volume.
2024-02-13 03:18:19 -06:00
..
.gitignore Add .gitignore 2022-08-10 20:09:22 -04:00
README.md Update README 2022-08-11 15:56:07 -04:00
__init__.py dx2cg: Allow usage as Python module 2024-02-13 01:40:07 -06:00
disassembler.py dx2cg: Implement RECT, CUBE texture types 2024-02-13 03:18:19 -06:00
main.py dx2cg: Allow usage as Python module 2024-02-13 01:40:07 -06:00
swapper.py dx2cg: Allow usage as Python module 2024-02-13 01:40:07 -06:00

README.md

dx2cg

Tools for converting d3d9 shader assembly to HLSL/Cg.

  • disassembler.py: Takes in d3d9 assembly and gives back the HLSL equivalent.
  • swapper.py: Searches a shader file for d3d9 assembly and calls the disassembler to replace it with HLSL.
  • main.py: Executes the swapper on every file in a path, writing the changes to new files.

Known issues

  • Only vertex shaders with profile vs_1_1 are supported
  • Only fragment shaders with profile ps_2_0 are supported
  • Only a limited set of instructions (those used by FF and Unity 2.6) are supported
  • Properties that don't begin with an underscore do not get captured as locals