mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-01-09 14:48:08 -05:00
* Basic implementation of `clip_distances` for Vulkan and GL backends * Added GPU test for `clip-distances` * Update feature array size * Add changelog entry * Validate `clip_distances` array size * Check for `clip_distances` enable directive * Consolidate code for generating `enable` directives in WGSL backend and add `clip_distances`.
12 lines
265 B
WebGPU Shading Language
12 lines
265 B
WebGPU Shading Language
enable clip_distances;
|
|
struct VertexOutput {
|
|
@builtin(position) position: vec4<f32>,
|
|
@builtin(clip_distances) clip_distances: array<f32, 1>,
|
|
}
|
|
|
|
@vertex
|
|
fn main() -> VertexOutput {
|
|
var out: VertexOutput;
|
|
out.clip_distances[0] = 0.5;
|
|
return out;
|
|
} |