Compile HLSL shaders in Visual Studio IDE
by Kevin Johnson · 07/09/2005 (12:08 pm) · 2 comments
Create a folder in your TSE project named something useful like HLSL. From there i create subfolders for each target. Add your hlsl to this folder (rightclick->add existing)

Rightclick on your newly added file and go to properties

A window similar to the one below should appear

Drill down to Custom Build Step->General
and fill in the fxc.exe command line ( with arguments ) like this:
Command Line: "C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Utilities\fxc.exe" /Tvs_2_0 $(InputPath)
Outputs: $(InputName)
This would compile the file with profile vs_2_0, and should give you output a little like this:

I think the coolest thing about all this is you can now rightclick->compile your HLSL shaders, right from the project..
good luck
Rightclick on your newly added file and go to properties
A window similar to the one below should appear
Drill down to Custom Build Step->General
and fill in the fxc.exe command line ( with arguments ) like this:
Command Line: "C:\Program Files\Microsoft DirectX 9.0 SDK (Summer 2004)\Utilities\fxc.exe" /Tvs_2_0 $(InputPath)
Outputs: $(InputName)
This would compile the file with profile vs_2_0, and should give you output a little like this:
I think the coolest thing about all this is you can now rightclick->compile your HLSL shaders, right from the project..
good luck

Torque 3D Owner Jameson Bennett