문제

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

도움이 되었습니까?

해결책

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"
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top