luQ
luQ

Reputation: 529

Creating .fxo shader file using fxc.exe

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 :)

Upvotes: 1

Views: 4342

Answers (1)

Gábor
Gábor

Reputation: 10224

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"

Upvotes: 1

Related Questions