• Advertisement
Sign in to follow this  

Vertexshader in Screenspace

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

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
Advertisement
oops, it was the cullmode. I forgot that the y axe's sign is different in 3d and 2d space, so the culling flips.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement