• Advertisement
Sign in to follow this  

How do you get FX files into HLSL files?

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

How do you get FX Files into HLSL files? Is there some kind of exporter which does this, or are the two file formats the same? They look different to me.

Share this post


Link to post
Share on other sites
Advertisement
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
Thanks JollyJeffers, I will keep looking.

Oh and incase Remigius was serious, what book is that and is there a URL where I can read about it?

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
Sign in to follow this  

  • Advertisement