Sign in to follow this  

Difference of Rendering texture

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

There's 1 pixel offset of rendering texture on different video card. how to resovle this problem? reference: 1. if(FAILED(m_pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, &m_d3dpp, &m_pD3DDevice))) { .... } but when i set D3DDEVTYPE = D3DDEVTYPE_REF, it not appears any difference on different video card, but runs very slowly. 2. use sis* card D3DPRESENT_PARAMETERS m_d3dpp; m_d3dpp.BackBufferWidth = windowWidth; m_d3dpp.BackBufferHeight = windowHeight; ..... i set windowWidth = 400,windowHeight = 300, no difference but when i set windowWidth = 300, windowHeight = 200,some textures appear 1 pixel offset; 3. all render correctly on my intel 82865 card.

Share this post


Link to post
Share on other sites
The reason you get the same results output with D3DDEVTYPE_REF is because D3DDEVTYPE_REF tells DirectX to run in software mode. This means that instead of letting the graphics adaptor sweat, you put all load on the processor.

Since the software implementation is the same on all computers, the outcome is the same.

However, with D3DDEVTYPE_HAL you tell DirectX to use hardware acceleration. Since graphics adapters differ slightly in its implementation, it sometimes results in unwanted graphical glitches.

The solution to this depends on the context, but experiment with valus to get it look OK. You can also "camoflague" the 1px offset with some skilled artistic work :).

For instance, try to move the texture 0.05f or something similar, if you are lucky this small change will make all graphical adapters to come up with the same final on-screen position.

Share this post


Link to post
Share on other sites
i use OpenGL to get always the same result. but render a little slower than d3d.
and in OpenGL there's another problem with drawing a line, the reason is
that "Filled primitives and line primitives follow different rules for rasterization".mabey it's the same reason in d3d,i'll try as you said. thank you,Enselic.

Share this post


Link to post
Share on other sites

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