Jump to content
  • Advertisement
Sign in to follow this  
Climax

FX-File HLSL performance

This topic is 4210 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 Does using FX-files decrease or increase performance? Or is it the same if I just compile the HLSL shaders manually and call the renderstates and SetPixel/VertexShader etc. hardcoded? Did that sound ambiguous? :P I just get the idea that the Effect API has too much CPU overhead? Thanx

Share this post


Link to post
Share on other sites
Advertisement
The HLSL shader compilation isn't that quick, but it only has to take place at load-time, so even if it takes a second or two, that isn't much of an issue.

The Effect Framework's runtime methods (Begin, BeginPass, SetFloat, etc) are decently efficient. Theres no reason to look at them for speed improvements unless they start showing up in profiles, which is unlikely.

Overall, using the Effect Framework and HLSL shaders should have minimal effect on the actual performance of the application, if at all.

Hope this helps.

Share this post


Link to post
Share on other sites
In the case you run in a load time problem you can precompile effects files. The binary format could be used to create an effect much faster.

Share this post


Link to post
Share on other sites
Quote:
Original post by Demirug
In the case you run in a load time problem you can precompile effects files. The binary format could be used to create an effect much faster.


Do I use fxc.exe from the SDK?

Share this post


Link to post
Share on other sites
One more question...

In my FX-file, do I still use this code (referring to 'compile' keyword)? :

VertexShader = compile vs_2_0 mainVS();
PixelShader = compile ps_2_b mainPS();

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!