Jump to content

  • Log In with Google      Sign In   
  • Create Account

Why use 'SetVertexShader'?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 cozzie   Members   -  Reputation: 1765

Like
0Likes
Like

Posted 27 January 2013 - 12:14 PM

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.



Sponsor:

#2 mhagain   Crossbones+   -  Reputation: 8279

Like
0Likes
Like

Posted 27 January 2013 - 12:24 PM

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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#3 cozzie   Members   -  Reputation: 1765

Like
0Likes
Like

Posted 27 January 2013 - 12:56 PM

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). 



#4 mhagain   Crossbones+   -  Reputation: 8279

Like
0Likes
Like

Posted 27 January 2013 - 01:35 PM

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.


It appears that the gentleman thought C++ was extremely difficult and he was overjoyed that the machine was absorbing it; he understood that good C++ is difficult but the best C++ is well-nigh unintelligible.


#5 cozzie   Members   -  Reputation: 1765

Like
0Likes
Like

Posted 27 January 2013 - 03:57 PM

Thanks, got it. This really helps in profiling.

No surprises though, luckily






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS