Sign in to follow this  

[dx10] int2 pos: POSITION gets precision loss

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

Hi, for gpgpu, you can never imagine how crazy we are to do things. For example, i tested out that "storing data in texture and do Vertex Texture Fetch" is slower than "packing data in vertex buffer and no texture fetch". Thus I did such:
	const D3D10_INPUT_ELEMENT_DESC layout[] =
	{
		{ "POSITION", 0, DXGI_FORMAT_R32G32_SINT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0 },  
	};
//in vertex shader:
VS_OUT vs(in int2 vert : POSITION) {...}
As a result, for pre-input data <2,2>, i got vert as <2,3>. Huge precision loss! I don't know the reason, since i thought VB is merely a pass-through. Thanks for reading, good night:)

Share this post


Link to post
Share on other sites

This topic is 3717 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.

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