-
Notifications
You must be signed in to change notification settings - Fork 344
Open
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues
Milestone
Description
This fragment input builtin gives the position inside the pixel of the current fragment. (as a vec2<f32> with each coordinate in [0, 1])
Metal
This is the same as [[point_coord]] in Metal.
Vulkan
This is the same as SPIR-V's SamplePosition builtin. It requires the sampleRateShading but that's pretty much ubiquitous and already required by [[sample_index]] that maps to SampleID in SPIR-V.
D3D12
D3D12 doesn't have an equivalent builtin. However the multisampling pattern is known at pipeline compilation time (and in most implementations I expect it to be known statically). So this builtin could be emulated by using [[sample_index]] to index a static array.
Metadata
Metadata
Assignees
Labels
wgslWebGPU Shading Language IssuesWebGPU Shading Language Issues