Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Under Windows 8, what is the alternative to this code:

technique11 Light0Tex
    pass P0

technique11 Light1Tex
    pass P0


Light1Tech    = mFX->GetTechniqueByName("Light1");


Light1Tech->GetPassByIndex(p)->Apply(0, md3dImmediateContext);
share|improve this question
SharpDX.Toolkit has some custom functionality that wraps it. – r2d2rigo Dec 21 '12 at 13:30
In case it wasn't clear from Chuck's answer, this syntax belongs to the old-and-somewhat-deprecated "effect" system, which allowed wrapping up multiple shaders and render states in one source file using the technique/pass structure, and also provided a runtime API wrapping constant buffers and state-setting. D3D has moved away from this model; it now only officially supports one shader per file, and you must set up all constant buffers and state objects yourself. – Nathan Reed Jul 4 '14 at 3:10

Effects 11 is not supported by Windows Store apps for Windows 8.0 because it requires D3DCompile APIs at runtime. Hence, 'technique11' and it's kin are deprecated.

Effects 11 also has specific compiler support in the HLSL compiler, which in the latest (#47) is still there but emits a warning. Some newer DX 11.1 and DX 11.2 constructs are not supported with the legacy fx_5_0 profile.

All that said, you can technically use Effects 11 in a Windows Store app for Windows 8.1 because D3DCompiler #47 is present at runtime. You can also continue to use Effects 11 for Win32 desktop apps as long as you recognize a future HLSL compiler revision is likely to remove support for the required fx_5_0 profile.

See the Effects 11 CodePlex project.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.