Sign in to follow this  

Screen Coordinate Shader Problem

Recommended Posts

Hi guys,

I don't understand why the following does't work, the vertex inputs are in screen coordinates:

// vertex shader part


I'm doing it this way because I don't want to use sprites and I'd rather not use a seperate vertex buffer/declaration (with D3DDECLUSAGE_POSITIONT), plus it seems pretty straightforward and efficient (if it worked.)

What do you think ?


Share this post

Link to post
Share on other sites
Are you sure ScreenWidth & ScreenHeight are set properly?

If your using DirectX and installed the SDK then you have PIX, which you should run and use the shader debugger to look at how things are getting transformed.

Also, make sure you set your view(etc.) matrix to a properly configured orthographic matrix.

(But just use PIX, it will tell you what's wrong easy)

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