Sign in to follow this  
SymLinked

How do you get FX files into HLSL files?

Recommended Posts

The difference stems from the application side rather than the data side. FX files are for use via the Effects framework (ID3DXEffect) whereas 'pure' HLSL files need to be managed by you - you directly compile the vertex/geometry/pixel shader by providing an entry point name and then manage the IDirect3D{Vertex|Pixel}Shader9 interfaces).

I've not done any D3D9 work for a while (10 all the way [cool]) but you should be able to do a straight compile on a .fx file by giving it the appropriate entry point - but you'll lose any of the multipass techniques and other pipeline configurations.

If that doesn't work, just strip out everything except the actual HLSL function(s) and their supporting declarations.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
...(10 all the way [cool])...


You know, you really should give us free copies of your upcoming book to compensate for having to put up with this D3D10 1337-ism [grin]

Share this post


Link to post
Share on other sites
I guess Jack has already left for his holiday, so I'll take the liberty of plugging the book for him. It's called Programming vertex, geometry and pixels shaders and you can read more about it over at his journal. Looks like a solid hands-on discussion of lighting techniques and a nice introduction to D3D10. I think I'll be getting it myself if I don't get a free copy, so it had better be good [wink]

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