Sign in to follow this  
numerical25

understanding fx files

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

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