Question

Does anybody know how to compile a single file containing various shaders (PixelShader, VertexShader, GeometryShader) using the fxc.exe tool provided by the DirectX 11 SDK?

The shader is used to create a tesselation-effect in a C++ programmed Enviroment:

The result should be a .fxo shader File.

Thx in advance :)

Was it helpful?

Solution

You run the compiler separately for each effect source file (one source file per effect, including the various shaders and helper routines). There will be a separate shader object file for each effect, similarly. The command line depends on what you actually want to compile but something like this:

fxc.exe /T ps_2_0 /nologo /E main /Fo"Effect.fxo" "Effect.fx"

or

fxc.exe /T fx_4_0 /nologo /Fo"Effect.fxo" "Effect.fx"
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top