Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan: Use VK_EXT_provoking_vertex, when available, to get OpenGL/PSP behavior for flat shading #19331

Merged
merged 3 commits into from
Jul 17, 2024

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Jul 17, 2024

"Provoking vertex" decides which vertex in a triangle gets to decide the color when doing flat shading.

We have a software workaround to match the PSP's (and OpenGL's) behavior, but it's buggy, resulting in #19323 .

Fortunately, there's a pretty widely available Vulkan extension that switches it over to OpenGL's behavior (last-vertex) so if available, let's just use it and skip the software workaround.

This does not fix the bug causing #19323 , but lets us avoid that code. Fixing the bug will be done in a separate PR, which will thus also fix it for D3D9 and D3D11.

The original issue affected by provoking vertex is #10969 .

EDIT: Weirdly, there's still a glitch in Blade Dancer with this.. This glitch is also present in OpenGL.

image

@hrydgard hrydgard added this to the v1.18.0 milestone Jul 17, 2024
@hrydgard hrydgard merged commit 434b361 into master Jul 17, 2024
18 checks passed
@hrydgard hrydgard deleted the vk-ext-provoking-vertex branch July 17, 2024 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant