Jump to content
  • Advertisement
Sign in to follow this  
numerical25

understanding fx files

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

Just curious on why .fx content has to be put in a seperate file. The code looks exactly like C. why not just make a fx class. If someone could explain that with the least of amount of jargon, that would be great. thanks!

Share this post


Link to post
Share on other sites
Advertisement
While HLSL does look like C, it is not the same language. Therefore, it has a different compiler than C. Also, the shader code is linked to the host application manually (Create*Shader, Set*Shader), unlike C modules which are typically linked statically or from within a DLL.

Note that it is perfectly possible to embed effect or shader code to a C module as text, and then compile it at runtime by using the D3D compiler functions.

[Edited by - Nik02 on April 24, 2010 8:13:02 AM]

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!