How do you get FX files into HLSL files?

Started by
4 comments, last by remigius 17 years, 1 month ago
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.
Advertisement
Hi,

Can you please tell us the differences you have seen?
_____________________Lecturer at Blekinge Institute of Technology
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

<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ | MVP Profile | Developer Journal ]</small>

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]
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!
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?
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]
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!

This topic is closed to new replies.

Advertisement