Jump to content
  • Advertisement
Sign in to follow this  
burrru

how to assemble shader 4.0 with D3DXAssembleShaderFromFile

This topic is 3495 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

I try to assemble shaders with D3DXAssembleShaderFromFile. It works fine with shader models 2.0 and 3.0 but returns zero with shader model 4.0. Is there way to fix it or I have to use another function?

Share this post


Link to post
Share on other sites
Advertisement
Take a look at the debug output window to see if the debug runtimes are giving you any errors. If not, then you will need to take a look at the compilation result and see why its not compiling. The easiest way to do that is to use the fxc.exe tool that is bundled with the DXSDK.

Just as a sanity check, do you have a shader model 4 compatible graphics card? If the card is the problem, then you could try running with the reference rasterizer to see if it works and compiles your shader too.

Good luck!

Share this post


Link to post
Share on other sites
It shouldn't be possible to assemble a shader for any target 4.0 or greater. MS doesn't make that functionality available since we have an optimizing compiler that does a very good job and for security reasons. If there is an issue you are trying to work around please post it so that we can take a look at it. Otherwise, what are you interested in doing?

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!