# .fx syntax and/or tutorial

## 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

## 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

• ### Forum Statistics

• Total Topics
627701
• Total Posts
2978700

• 21
• 14
• 12
• 10
• 12