Jump to content
  • Advertisement
Sign in to follow this  
Hyunkel

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

This topic is 3074 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
I think you'll want to use D3DCompiler.ShaderByteCode.CompileFromFile

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!