Advertisement Jump to content
Sign in to follow this  

C++ Compile shaders inside of IDE

Recommended Posts

Is it possible to compile shaders directly from the IDE? What I tried -> when you right-click on the .fx files on the IDE file pane, you've got a few options, one of which is to choose which program to open that file, if you choose the fxc.exe, you can't really compile anything, you also have exclude from build and item type option inside properties.

Any one sheds some lights on this?



Share this post

Link to post
Share on other sites

You can add .hlsl files to your solution, and they will be compiled to .cso objects when building (remember to right-click them in the Solution Explorer and set stuff like shadertype, shaderversion, entrypoint etc.), which you can then use directly in your program using DX11Device->CreatePixelShader(...) etc.!


Edited by vinterberg

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!