Jump to content
  • Advertisement
Sign in to follow this  
yk_cadcg

[dx10] int2 pos: POSITION gets precision loss

This topic is 3937 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!