Jump to content
  • Advertisement
Sign in to follow this  
LotusExigeS1

SlimDX Direct3D9.Sprite,Draw + shader

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

Hello, I am trying to use an effect with sprite.draw but its not having any effect on the results.

I believe you are supposed to just do effect.begin, effect.beginpass, spritebatch.begin, draw and then end everything. But it has no effect.

The shader loads ok and looks like this (for testing) -

float4 ps1() : COLOR
{
return float4(1,1,1,1);
}

technique main
{
pass P0
{
VertexShader = null;
PixelShader = compile ps_3_0 ps1();
ZEnable = false;
}
}

Any help is very much appreciated.

Share this post


Link to post
Share on other sites
Advertisement
I don't know that you can ignore the vertex shader for a pixel shader 3.0 target. I'd try writing a vertex shader and see if that fixes the problem. Also check the debug output to see if Direct3D is giving you warnings about anything.

Share this post


Link to post
Share on other sites
Thanks for the fast response. I have just tried a ps2_0 version with a vertex shader and its no different. Also no errors are being thrown or reported.

Any other ideas ?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!