0

hey i am working on msaa in directx11 which is pretty easy to implement.

but now trying to make split screen for example, left side of screen is rendered without MSAA and right side is with MSAA, so i can see the differences between.

enter image description here

for my idea, i think, i have to create two different swapchain and different scenes from these and render together side by side, since we can set msaa count when creating swapchain. Is my opinion too much or not? Is there any standard or common(?!) way to implement this effect in directx11? just a few idea would be really appreciated !!

KIM CHANGJUN
  • 99
  • 11

1 Answers1

0

You can setup 2 difference viewport, For example:

//You can adjust these numbers as you like
//Left viewport
D3D11_VIEWPORT left_vp;
left_vp.Width = screen_width / 2;
left_vp.Height = screen_height / 2;
left_vp.MinDepth = 0;
left_vp.MaxDepth = 1;
left_vp.TopLeftX = 0;
left_vp.TopLeftY = 0;
device_context->RSSetViewports(1u, &left_vp);

device_context->Draw(3, 0);

//Right viewport
D3D11_VIEWPORT right_vp;
vp.Width = screen_width / 2;
vp.Height = screen_height / 2;
vp.MinDepth = 0;
vp.MaxDepth = 1;
vp.TopLeftX = screen_width / 2;
vp.TopLeftY = screen_height / 2;
device_context->RSSetViewports(1u, &right_vp);

device_context->Draw(3, 0);

Although you have 2 draw calls per frame but that probably fine

Read this for more information:

Getting Started with the Rasterizer Stage

  • Thanks for reply. But unfortunately i want to apply different msaa setting for each , which can only be set when creating swapchain. With your way, each screens have to have same msaa – KIM CHANGJUN Feb 25 '21 at 23:07