How can I compile SM 3.0 effects in D3D11 in slimdx?
- by jacker
var bytecode = ShaderBytecode.CompileFromFile("shaders\\testShader.fx", "fx_5_0", ShaderFlags.None, SlimDX.D3DCompiler.EffectFlags.None, null, null, out str);
var effect = new SlimDX.Direct3D11.Effect(gpu.Device, bytecode);
Works fine but if I try to use another shader model like 4.0 or 3.0 it throws an error on the new effect creation:
E_FAIL: An undetermined error occurred (-2147467259)
How do I compile older shaders? And I've read about device context but I can't find any information on how to use them to maintain DX9 compatibility.