Fix WebGPU error in "ui_pipeline" by adding a flat interpolate attribute (#8933)

# Objective

- Fix this error to be able to run UI examples in WebGPU
```
1 error(s) generated while compiling the shader:
:31:18 error: integral user-defined vertex outputs must have a flat interpolation attribute
    @location(3) mode: u32,
                 ^^^^

:36:1 note: while analyzing entry point 'vertex'
fn vertex(
^^
```

It was introduce in #8793

## Solution

- Add `@interpolate(flat)` to the `mode` field
This commit is contained in:
Ame 2023-06-25 14:50:47 -06:00 committed by GitHub
parent 469a19c290
commit bec299fa6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ var<uniform> view: View;
struct VertexOutput {
@location(0) uv: vec2<f32>,
@location(1) color: vec4<f32>,
@location(3) mode: u32,
@location(3) @interpolate(flat) mode: u32,
@builtin(position) position: vec4<f32>,
};