protonscr

MSAA rendering without line AA doesn't match D3D12

vkd3dclosed
HansKristian-Work/vkd3d-proton#1239 · opened 2022-09-19 by sherief · updated 2023-11-07 · 3 comments · github
Ssherief 2022-09-19 github

I'm rendering lines with a PSO that has SampleDesc.Count = 4, RasterizerState.AntialiasedLineEnable = FALSE, and RasterizerState.MultisampleEnable = FALSE. On native D3D12, the lines aren't anti-aliased while on Proton the lines show anti-aliasing applied. Changing RasterizerState.AntialiasedLineEnable and RasterizerState.MultisampleEnable to TRUE causes native to match Proton.

Let me know what other info I can provide to help with this.

HHansKristian-Work maintainer 2022-09-19 github

On native D3D12, the lines aren't anti-aliased.

What exactly does this mean? Is multisample coverage disabled, or is this the difference of "smooth lines" or not?

A repro would be helpful. Screenshot would also be helpful.

Ddoitsujin maintainer 2022-09-21 github

We do not implement all aspects D3D line rasterization, and it's rather difficult to do and requires features that are not supported by some Vulkan drivers. I believe the MSAA interactions are just straight-up impossible for us to support. We also cannot support any special rasterization rules for the wireframe fill mode.

I'd strongly recommend finding other means to accomplish more or less the same thing, e.g. enabling conservative rasterization on hardware that supports it.

Is there any practical use case that requires this to be accurate anyway? Even in D3D11 land I've never seen a single application rely on this.

HHansKristian-Work maintainer 2023-11-07 github

We implement the new line rasterization API which covers these I think.

Nothing extracted yet.