I am encountering a difficulty in my Direct3D 9 software the place horizontal strains seem at mounted 16-pixel intervals on a render goal floor. Here is the setup:
Atmosphere:
Direct3D 9, Home windows, rendering to a texture render goal.
Render Goal:
Created with:
pD3DDevice->CreateTexture(width, peak, 1, D3DUSAGE_RENDERTARGET, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pTextureImg, NULL)
then retrieved the floor with pTextureImg->GetSurfaceLevel(0, &pSurfaceImg)
. Dimensions are 1024×576.
Rendering:
Utilizing DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, vertices, sizeof(Vertex))
to attract a textured quad (supply texture has excellent edges) and a trailing impact (stable coloration quad with alpha mixing).
Signs:
Horizontal strains seem each 16 pixels (64 bytes in A8R8G8B8
) on pSurfaceImg
, seen in saved PNGs (D3DXSaveSurfaceToFile
).
Strains are faint, mounted in place, and solely noticeable on earlier frames when trailing is lively (mixing with alpha < 1).
The supply texture (obj_img.texture) has no such artifacts.
Makes an attempt:
- Modified mixing:
SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE)
for ultimate output, TRUE for picture rendering – resolved undesirable edge pixels however not the strains. - Adjusted vertex coordinates (from -0.5f offsets to actual 0 -> width/peak) – no change.
- Examined
D3DFMT_X8R8G8B8
as an alternative ofA8R8G8B8
– strains persist. - Tried
D3DPOOL_SYSTEMMEM
– unsupported for render targets on my {hardware}. - Sampler settings:
D3DTADDRESS_CLAMP
,D3DTEXF_LINEAR
for all filters – no impact.
Suspicions:
{Hardware} tiling (16×16 pixel tiles) in D3DPOOL_DEFAULT
amplified by trailing/mixing.
Potential render goal alignment or driver subject.