View Single Post
Old 25 September 2016, 21:41   #9
mark_k
Registered User
 
Join Date: Aug 2004
Location:
Posts: 2,476
Aha... so if I'm right this is the relevant code in direct3d.cpp:
Code:
// non-shader version
setupscenecoords ();
hr = d3ddev->SetTransform (D3DTS_PROJECTION, &m_matProj);
hr = d3ddev->SetTransform (D3DTS_VIEW, &m_matView);
hr = d3ddev->SetTransform (D3DTS_WORLD, &m_matWorld);
hr = d3ddev->SetTexture (0, srctex);
hr = d3ddev->DrawPrimitive (D3DPT_TRIANGLESTRIP, 0, 2);
int bl = filterd3d->gfx_filter_bilinear ? D3DTEXF_LINEAR : D3DTEXF_POINT;
hr = d3ddev->SetSamplerState (0, D3DSAMP_MINFILTER, bl);
hr = d3ddev->SetSamplerState (0, D3DSAMP_MAGFILTER, bl);
I read the doc for D3DSAMPLERSTATETYPE enumeration, and that says:
"D3DSAMP_ADDRESSU
Texture-address mode for the u coordinate. The default is D3DTADDRESS_WRAP. For more information, see D3DTEXTUREADDRESS."

It looks like you should use D3DTADDRESS_CLAMP for D3DSAMP_ADDRESSU and D3DSAMP_ADDRESSV. So add something like
hr = d3ddev->SetSamplerState (0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP);
hr = d3ddev->SetSamplerState (0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP);

Last edited by mark_k; 25 September 2016 at 22:10.
mark_k is offline  
 
Page generated in 0.04719 seconds with 9 queries