Sign in to follow this  
LotusExigeS1

SlimDX Direct3D9.Sprite,Draw + shader

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

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