Jump to content
  • Advertisement
Sign in to follow this  
cozzie

Why use 'SetVertexShader'?

This topic is 1996 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,

Maybe a stupid question, but why should I use d3ddev->SetVertexShader of SetPixelShader?

 

I use D3DXEffect and a VertexDeclaration I set with d3ddev->SetVertexDeclaration. Everything works nicely and I don't use SetVertexShader or SetPixelShader.

 

I'm only using effects/shaders, no fixed pipeline support.

Share this post


Link to post
Share on other sites
Advertisement

If you're using Effects you don't need to, but you don't have to use Effects.

 

Remember - the Effects framework is just a wrapper around the D3D9 API; it's nothing more, it doesn't talk to either the hardware or the driver on it's own, all it is is just a software wrapper.  So the option to not use Effects is always there, and that's when you'd use SetVertexShader and SetPixelShader.

Share this post


Link to post
Share on other sites

Thanks.

I'd think then that the D3DXEffect functions to set a technique or begin a technique/pass would do the 'SetVertexShader' calls then in the background. Strange thing is that I don't see this back when profiling in PIX (no SetVertexShader at all in rendering a frame, just a settechnique). 

Share this post


Link to post
Share on other sites

Depending on the capture type you've selected, you'll have a "Capture D3DX calls also" checkbox - check that and you'll see them.  Only the BeginPass and CommitChanges calls should be expandable, as they're where Set*Shader calls are made and constant registers are set; everything else is just the software layer that doesn't call into D3D but merely buffers up stuff until either BeginPass or CommitChanges are called.

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!