Sign in to follow this  

Why we not use DirectX Effect Framework in our engine directly?

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

In directx sample browser, the samples are implemented by effect files.
I want to known why we not use this effect framework directly,the ID3DXEffect、ID3D10Effect interface are easy to use.
but when I check the source code of unreal3, it is not use this framework.
in Ogre3D, it seem that they implement a new effect framework by themselves.

my friend tell me, if we use effect file, when directx change the render state, it may be very slowly, if we manager it in c++, we can optimize it.

~~~
so, could any friends give me any information about this question.
I searched it but found nothing.

Share this post


Link to post
Share on other sites
i dont think its slow. it use internally renderstateblocks which is faster then changing single renderstates. Since this framework is easy to impletend, try at least to make it an alternative to ur own.
It can be useful to see speeddifference but also if u impletend stuffs correct!

Share this post


Link to post
Share on other sites
Both OGRE and Unreal support multiple graphics APIs (Direct3D and OpenGL) so they can support as many platforms as feasible (eg both xbox and ps3). That is why they build their own Effect framework.

Do not do this if you write a renderer. Use the Effect framework. Any performance improvements you could get by not using it will not help you finish your first 3D game, nor will it give you a better understanding of how rasterization works.

Share this post


Link to post
Share on other sites
You can tell effects not to use stateblocks, and you don't have to set state in effects either.

Personally though I've found that if you're going to use the effects framework at all, it works best if you use it for everything. That might be what you want, but then again it might not be; you might not want to bother writing shaders for your 2D HUD/menu/GUI stuff, for example. Or you might be porting a bunch of legacy code and need to have the new code interoperate cleanly with the old code. Strange things can happen with the effects framework in these kind of scenarios.

Also, it seems as though the framework is marked for deprecation (or at the very least being strongly played down) in D3D11; no headers or libs ship with the SDK, you have to compile the framework from source yourself, etc.

Share this post


Link to post
Share on other sites
[quote name='db123' timestamp='1293652604' post='4752002']
thanks...
[/quote]

Historically the effects system (for D3D9) was for prototyping and was not suitable for production use, due to performance problems in the design. The newer versions look a lot better though I would still be a bit apprehensive if some new engineer at work walked up to me and tried to convince me that its totally the right thing to do now.

Share this post


Link to post
Share on other sites
Yeah the DX9 / DX9.5 effects framework was a CPU hog.

If you have custom state block management, you might still want to implement your own system rather than use the effects framework. Especially if your system implements high-level state management across several different rendering APIs.

Share this post


Link to post
Share on other sites

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