Sign in to follow this  
Halsafar

Disable SetPixelShader() -- [RESOLVED]

Recommended Posts

How on earth can I set a PixelShader using lpDevice3D->SetPixelShader(...); Rendersomething; Set regular pixel shader; Render stuff without pshader; [Edited by - Halsafar on June 28, 2005 8:41:12 PM]

Share this post


Link to post
Share on other sites
If you mean to return to the fixed function pixel shader,

SetPixelShader(NULL)

oughta do it for ya.

It's the same thing as reverting to the fixed function vertex pipeline, however, you'd have to declare your FVF again for the FF to work.

Share this post


Link to post
Share on other sites
Quote:
Original post by Halsafar
How on earth can I set a PixelShader using lpDevice3D->SetPixelShader(...);
Rendersomething;
Set regular pixel shader;
Render stuff without pshader;

There is no "regular pixel shader". If you want to render something without the pixel shader, you need to set the fixed function parameters it needs. So you'll need things like the FVF for the model, the texture blending modes, etc...

neneboricua

Share this post


Link to post
Share on other sites
....
I dunno if I asked this wrong or what.

For every object I render I SetFVF()
I set its matrix, its texture, its StreamSource().

When I turn on even one pixel shader, everything else gets screwed.
I set it will SetPixelShader()
then SetPixelShader(NULL)

Even if those 2 lines are right after another, the PShader stays and everything is a mess.

Share this post


Link to post
Share on other sites

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