Jump to content
  • Advertisement
Sign in to follow this  
serious_learner07

Compile pixel shader to .fx format

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

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

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!