Sign in to follow this  
wh1sp3rik

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 this post


Link to post
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 this post


Link to post
Share on other sites
wh1sp3rik    248

Yep smile.png problem solved.

RECT realWindowSize = {0, 0, width, height};
AdjustWindowRect(&realWindowSize, WS_OVERLAPPEDWINDOW, FALSE);
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

Share this post


Link to post
Share on other sites

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