Jump to content
  • Advertisement
Sign in to follow this  
bobbyb

Need your help with .fx file guys!

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

Hi guys, im trying to get into the whole shader area of DX9 recently. Ive had a play with the DX9 shader in Max 6 and making a custom one to export out with my mesh (using panda). The trouble is, I have no way of knowing if it is working or now. In MAX everything looks good. I can see my normal and diffuse map fine, so I export my mesh usin Panda, with .fx the setting enabled. Trouble is, once I do that, I cant view the thing in meshviewer. I was wondering if anyone here who know a bit mor about shader .fx files could enlighten me on where im going wrong. Maybe if someone could paste in the text for a simple shader which would allow me to just change the filems for diffuse and normal maps that could start me off! Im only a 3d artist, but im trying to help out our coder by trying out some of this shader stuff on my own. Cheers in advance guys. Rob

Share this post


Link to post
Share on other sites
Advertisement
I've only just recently got my fx file support and shaders working but one word of warning its not that easy. You need to understand the HLSL (High Level Shader Language) well that is you need to understand how information is passed to the Vertex shaders and Pixel shaders. This is not simple let me tell you. Each Shader in an fx file may require different values passed to it, this is usually done with a call to EffectObj->SetMatrix also other value may be required to be pass to the shaders like floating point values and textures. If you could post the fx file code me or someone on here with more shader experience might be able to point you in the right direction.

Share this post


Link to post
Share on other sites
Hi bobbyb,

I learned a great deal from using FX Composer (free for download by nVidia here). They use .fx files as materials, and make it pretty easy to see what is going on in the effect file as well as showing you the assembly version of your shaders, performance info, and easy editing.

FX Composer also comes with many, many samples to get you started. I haven't tried it yet, but I think RenderMonkey is very similar (just made by ATI).

Share this post


Link to post
Share on other sites
I recommend reading the "Effects" chapter of the DirectX Graphics programming guide, found in the DX SDK c++ documentation. The sample code therein is heavily commented, and relatively easy to follow - and you gain some insight as to what hoops a graphics engine has to jump through in order to use the effect framework.

Even though you aren't primarily a programmer, it's quite helpful to know about the system with which your media interfaces with the programmer's efforts.

Please ask for more info and/or help if needed; I'm fairly experienced in both programming and 3d art creation.

-Nik

Share this post


Link to post
Share on other sites
I dont know, I disagree with the poster who says HLSL is hard. I think it's invented to be easy. The tutorial HLSL workshop (comes with the SDK docs) is the best way to get started. EffectEdit gives you a dumbed-down entry into the whole .fx structure.

Then again I still use EffectEdit =)

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!