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

Support Barycentrics in Shaders #2900

Open
cwfitzgerald opened this issue Jul 20, 2022 · 1 comment
Open

Support Barycentrics in Shaders #2900

cwfitzgerald opened this issue Jul 20, 2022 · 1 comment
Labels
area: api Issues related to API surface backend: dx12 Issues with DX12 or DXGI backend: metal Issues with Metal backend: vulkan Issues with Vulkan help required We need community help to make this happen. type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

cwfitzgerald commented Jul 20, 2022

Is your feature request related to a problem? Please describe.
Getting triangle barycentric coordiates is useful for various operations, including wireframes and visbuffer schinanigans.

Describe the solution you'd like

A @builtin(barycentric) vec3<f32> that is implemented on top of SV_Barycentrics in HLSL, [[barycentric_coord]] in msl 2.2+, and either VK_NV/KHR_fragment_shader_barycentric or VK_AMD_shader_explicit_vertex_parameter.

Depends on us having DXIL via #2722

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request help required We need community help to make this happen. backend: dx12 Issues with DX12 or DXGI backend: metal Issues with Metal backend: vulkan Issues with Vulkan area: api Issues related to API surface labels Jul 20, 2022
@olivia-fl
Copy link

An equivalent to PerVertexKHR from VK_KHR_fragment_shader_barycentric would also be useful. Not sure if that should be a separate feature request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: api Issues related to API surface backend: dx12 Issues with DX12 or DXGI backend: metal Issues with Metal backend: vulkan Issues with Vulkan help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants