# Strange blocks/grid on a screen

## Recommended Posts

wh1sp3rik    248

Hello,

becuase these artefacts are mostly visible when moving, i will try to describe my problem without screenshot.

I disabled all my other rendering in my engine, so i am sure, this problem is not generated by lighting/shadowing/post effects...

I just rendered scene without any effects.

When moving, and when i am far from objects ( buildings, terrain ), i can see somekind of grid of rectangles over whole screen. It seems, filtering changes on their edges, that's why i am able to see them.

I was trying to figure out, why it's happening. I know, pixel shader runs thread per pixel .. and these threads are in groups. Something like compute shader, where i usually define screenheight/16 and screenwidth/16 of groups. Who knows ,lol.

Do you have any ideas, how to ged rid of that and how it's called ?

thank you very much !

EDIT: this artefact is visible only in window mode !

Edited by wh1sp3rik

##### Share on other sites
unbird    8335

EDIT: this artefact is visible only in window mode !

Make sure your backbuffer/swapchain dimension matches the window's client area.

##### Share on other sites
wh1sp3rik    248

EDIT: this artefact is visible only in window mode !

Make sure your backbuffer/swapchain dimension matches the window's client area.

That's interesting point as i bet, client's area is different from window size, thank you, will test it !

##### Share on other sites
wh1sp3rik    248

Yep problem solved.

RECT realWindowSize = {0, 0, width, height};
HWND WindowHandle = CreateWindowEx(NULL, L"CLASSNAME", (LPWSTR) "WINDOWTITLE",WS_OVERLAPPEDWINDOW,300,300,realWindowSize.right-realWindowSize.left,realWindowSize.bottom - realWindowSize.top,NULL,NULL,wc.hInstance,NULL);


Edited by wh1sp3rik