Sign in to follow this  
Buck Fush

Vertexshader in Screenspace

Recommended Posts

I'm trying to draw screenquads with the help of a vertexshader 1.1 in Directx8.1. But I don't see anything. Other shaders with transformation matrix work just fine. The culling mode is correct. I stripped most of this from my fixed function code. DWORD dwDecl[] = { D3DVSD_STREAM(0), D3DVSD_REG(0, D3DVSDT_FLOAT3), // position (I've also tried D3DVSDT_FLOAT4) D3DVSD_REG(1, D3DVSDT_FLOAT2), // texture coord D3DVSD_END() }; // shadercode: vs.1.1 mov oPos,v0 mov oT0, v1 That's how I fill the VB: float w=512.0f; // I've also tried 1.0f for w&h float h=512.0f; float *vb from vertexbuffer lock vb[0] = 0.0f; vb[1] = 0.0f; vb[2] = 0.0f; vb[3] = 0.0f; // u,v vb[4] = 0.0f; vb+=5; vb[0] = w; vb[1] = 0.0f; vb[2] = 0.0f; vb[3] = 1.0f; // u,v vb[4] = 0.0f; vb+=5; vb[0] = w; vb[1] = h; vb[2] = 0.0f; vb[3] = 1.0f; // u,v vb[4] = 1.0f; vb+=5; vb[0] = 0.0f; vb[1] = h; vb[2] = 0.0f; vb[3] = 0.0f; // u,v vb[4] = 1.0f; Thankx in advance

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