Shader authoring/Compiling Shaders
Jump to navigation
Jump to search
This article or section needs to be cleaned up to conform to a higher standard of quality.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
For help, see the VDC Editing Help and Wikipedia cleanup process. Also, remember to check for any notes left by the tagger at this article's talk page.
Compiling .FXC Files
To compile .FXC files, list them in a text file (one per line), then run src\materialsystem\stdshaders\buildsdkshaders.bat on the text file. It will go process your .FXC code and compile all the combinations into your mod's directory. The syntax of the buildsdkshaders.bat command line is:
buildsdkshaders.bat [text filename] -game [mod directory] -source [source directory]
Example:
buildsdkshaders.bat MyShaders -game "C:\Steam\SteamApps\SourceMods\MyMod" -source "C:\MyMod\Src"
Refer to stdshaders_dx8.txt and stdshaders_dx9.txt as examples of how to set up your shaders text file. All the source code for the shader DLL should be in the same directory as the .FXC, .VSH, and .PSH files. After buildsdkshaders.bat runs, you can look in the fxctmp9 sub-directory to see the include files generated by the shader compiler.