• Advertisement
Sign in to follow this  

DirectX 9/SlimDX - Vertex/PixelShaders

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

Faster than using Effect, by all accounts, but I'm lacking on the "how to get at them". Need to know either:

1) How to get them from the Effect (handle string is non-obvious, unless it's the file name, which I probably should have tried).
2) How to load them myself.

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Looks OK by me.

Anyway, the "HLSL Without Effects" sample in the SDK provides all you need to know for C++; I don't know about SlimDX versions of these calls though, but would assume that they do exist since Effects is just a wrapper around the raw vertex/pixel shader API. I see from it's documentation that it does have a PixelShader class, for example, so it should be just a matter of translating the calls.

Faster than Effects? Maybe, maybe not. Obviously you don't have the overhead of the wrapper to contend with, but that overhead is really quite minimal. Also, with the raw API you have to do certain things yourself that Effects will automatically manage for you - such as buffering up constants and sending them in bulk to the driver just before draw calls, for example.

So I'd personally stick with Effects if it's working well enough for you and if you don't have a specifc use case that goes beyond what it does.

Share this post


Link to post
Share on other sites
[quote name='mhagain' timestamp='1340401799' post='4951846']
Looks OK by me.

Anyway, the "HLSL Without Effects" sample in the SDK provides all you need to know for C++; I don't know about SlimDX versions of these calls though, but would assume that they do exist since Effects is just a wrapper around the raw vertex/pixel shader API. I see from it's documentation that it does have a PixelShader class, for example, so it should be just a matter of translating the calls.

Faster than Effects? Maybe, maybe not. Obviously you don't have the overhead of the wrapper to contend with, but that overhead is really quite minimal. Also, with the raw API you have to do certain things yourself that Effects will automatically manage for you - such as buffering up constants and sending them in bulk to the driver just before draw calls, for example.

So I'd personally stick with Effects if it's working well enough for you and if you don't have a specifc use case that goes beyond what it does.
[/quote]
Thanks - I was previously given the impression that accessing directly would be significantly faster, although I may not have interpreted what was said correctly.

If it's not significantly faster, I'll focus on more critical areas of my code. :)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement