[SlimDX] SlimDX.Direct3D10.Effect.FromFile has no ShaderMacro[] parameter

Started by
1 comment, last by Mike.Popoloski 13 years, 9 months ago
In c++ you create an effect from file like this:
D3DX10CreateEffectFromFile( str, Shader_Macros, NULL, D3D10_SHADER_ENABLE_STRICTNESS, 0, pd3dDevice, NULL, NULL, &g_pEffect10, NULL );


However, the SlimDX equivalent doesn't take a ShaderMacro array as a parameter:
SlimDX.Direct3D10.Effect.FromFile(device, str, "fx_4_0", ShaderFlags.None, EffectFlags.None, null, null);


How do I use shader macro's with SlimDX?

Cheers,
Hyu
Advertisement
I think you'll want to use D3DCompiler.ShaderByteCode.CompileFromFile
The D3D10 effect interface doesn't use the D3DCompiler system, unlike D3D11. It looks like we don't provide overloads that take shader macros. File an issue on our issue tracker and we'll have it fixed for the next release.
Mike Popoloski | Journal | SlimDX

This topic is closed to new replies.

Advertisement