Jump to content
  • Advertisement
Sign in to follow this  
cybbe

Shader examples

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

I'm quite new to DirectX but I've had time to try many small projects and I've been reading quite much about D3D. So I've understood that the FFP is the "old way" of doing things and shader is the thing nowadays. I've also heard rumors that D3D10 / WGF 2.0 or whatever will be very shader-focused and maybe not even have FFP-stuff in the API. Well well, enough about things I really don't understand. I have some basic knowledge of how .fx files works and how they look. But I haven't found many / any? examples / tutorials on _how_ to write the D3D code that loads and uses .fx files. I know that there are several examples in the DirectX SDK but I would really like something smaller / lighter and perhaps ... more "tutorialish" :) More docs on how shaders work would also be appreciated. I see .fx-files that loads .x-files and ... I can't really understand that. Well well, any docs / examples / tutorials on shaders and especially how to implement them in D3D would be appreciated. Thanks ^^

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by cybbe
I'm quite new to DirectX but I've had time to try many small projects and I've been reading quite much about D3D. So I've understood that the FFP is the "old way" of doing things and shader is the thing nowadays. I've also heard rumors that D3D10 / WGF 2.0 or whatever will be very shader-focused and maybe not even have FFP-stuff in the API. Well well, enough about things I really don't understand.

It's still good to learn FFP before diving into shaders. It will help you understand the graphics pipeline, which really helps you understand shaders.
Quote:

I have some basic knowledge of how .fx files works and how they look. But I haven't found many / any? examples / tutorials on _how_ to write the D3D code that loads and uses .fx files. I know that there are several examples in the DirectX SDK but I would really like something smaller / lighter and perhaps ... more "tutorialish" :)

Well, you said you checked out the SDK samples, but I still think the BasicHLSL sample is quite simple to understand. After all, .fx-files are not really hard to use. Integrating them to your rendering pipeline is harder.
Quote:

More docs on how shaders work would also be appreciated. I see .fx-files that loads .x-files and ... I can't really understand that. Well well, any docs / examples / tutorials on shaders and especially how to implement them in D3D would be appreciated.

Thanks ^^

There is a thing in fx files, called semantics and annotations. They are metadata that your app can use to feed the shader the data it needs. If you're just starting out with shaders, IMHO you don't need to care about them that much. But if you're still interested, check out the SDK docs about them (under the section "Effect reference").

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!