# .fx syntax and/or tutorial

This topic is 1689 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I'd like to better understand effect (.fx) files.  Up to know I've used individual shader functions in .hlsl files, but being able to group multiple functions, and shader state in a single file is something I'd like to do.  Unfortunately even after Google-ing around for a few hours I cannot seem to get any relevant info on them.  I've downloaded a number of different examples but they all seem to use different syntax.  For example some use:

VertexShader = compile vs_5_0 vertex_shader();

while others use:

SetVertexShader( CompileShader(vs_5_0,vertex_shader()) );

What's the difference?  What shader state can I set?  What are the types?  Is it better to use global variables or constant buffers?  Ect...

I can't seem to find a good tutorial or examples.  Even the samples I could find on MSDN were sparse at best.  I don't need info on how to compile or run the .fx files (thats all well documented) but rather what additional features/types/states/ect... do .fx files have that isn't found in normal hlsl files?

Edited by Ryan_001

1. 1
2. 2
frob
16
3. 3
4. 4
5. 5
Rutin
10

• 18
• 13
• 14
• 76
• 22
• ### Forum Statistics

• Total Topics
632140
• Total Posts
3004355

×