Skip to content

Supported shader barycentric coords on OpenGL, Vulkan and Metal#3090

Open
jay3d wants to merge 1 commit intobkaradzic:masterfrom
jay3d:barycentrics
Open

Supported shader barycentric coords on OpenGL, Vulkan and Metal#3090
jay3d wants to merge 1 commit intobkaradzic:masterfrom
jay3d:barycentrics

Conversation

@jay3d
Copy link
Contributor

@jay3d jay3d commented Apr 24, 2023

Fragment shader barycentric coords support following this spec: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VK_KHR_fragment_shader_barycentric.html

I have modified some 3rdparty sources for this to work and I have made PRs of those to their respected repositories:
KhronosGroup/glslang#3198
KhronosGroup/SPIRV-Cross#2137
So when the above gets approved and merged, it will be already here.

@jay3d jay3d requested a review from bkaradzic as a code owner April 24, 2023 17:16
@bkaradzic
Copy link
Owner

👍 Looks good! I'm just going to wait for glslang and SPIRV-Cross to accept it.

@bkaradzic
Copy link
Owner

You shouldn't be using merge into this branch, rather rebase, so that your changes always appear as the top.

@jay3d
Copy link
Contributor Author

jay3d commented Aug 6, 2023

You shouldn't be using merge into this branch, rather rebase, so that your changes always appear as the top.

I can? It's good to know for next time, thanks! :)

@bkaradzic
Copy link
Owner

You can even fix this branch by removing undesired merges so that only new changes appear, and then force pushing it.

@jay3d jay3d force-pushed the barycentrics branch 2 times, most recently from 0859c47 to ba661ef Compare May 3, 2024 02:21
@jay3d jay3d changed the title *RENEWED* Supported shader barycentric coords on OpenGL, Vulkan and Metal Supported shader barycentric coords on OpenGL, Vulkan and Metal May 3, 2024
@bkaradzic
Copy link
Owner

Any luck with this being accepted in glslang?

@jay3d
Copy link
Contributor Author

jay3d commented Feb 7, 2025

Any luck with this being accepted in glslang?

The spirv-cross part was fixed, but glslang won't work properly and it will remain a hack because of glslang architecture itself.
A better pathway in my guess would be to adopt DXC (slang is still very meh in my tests even worse than spirv-cross/glslang) since the support now is mature, and an alternative path can be added for Metal which can use https://developer.apple.com/metal/shader-converter/ I had success using it with bgfx in my internal branch along with DXC. But I need more time completing DXC integration in bgfx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants