Sign in to follow this  

understanding fx files

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

This topic is 2795 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.

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