Sign in to follow this  

Compile pixel shader to .fx format

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

.fx files usually contain uncompiled shaders that the effect framework will compile for you. You can, however, use assembly language shaders in effect files; instead of specifying the shader with the "compile target entrypoint([arguments])" syntax, you can set the shader to be an asm block:


VertexShader = asm {
...your assembly shader here...
};





Note that D3D10 and later do not allow specifying shaders in assembly language anymore.

Share this post


Link to post
Share on other sites
I'm sorry I don't fully understand the question. Fx extension is mostly used as a effect shader source file. Ie. You put your effects source code in there. Compiling shaders can be done using the standalone compiler that comes with the DXSDK.

GBS

Share this post


Link to post
Share on other sites
*.psh and *.vsh contains simply a pixel and vertex shader code that you will compile separately.
You will gain a ID3D10PixelShader and ID3D10VertexShader which, set in the device, will draw your geometries.

The *.fx file contains, instead, 1 or more pixel, vertex and geometry shader, grouped in a technique and passes.

Share this post


Link to post
Share on other sites
Quote:
Original post by XVincentX


The *.fx file contains, instead, 1 or more pixel, vertex and geometry shader, grouped in a technique and passes.


Correction: 0 or more [smile]

Also, the .fx, .psh and .vsh are just convenient (and common) extensions for effect and shader files - the compiler doesn't actually distinguish the files based on the extensions nor does it actually care what the extensions are, as long as the files get found and their contents are comprehensible.

Share this post


Link to post
Share on other sites

This topic is 3456 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.

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