use @interpolate(flat) attribute as per the WebGPU spec:
User-defined vertex outputs and fragment inputs of scalar or vector integer type must always be specified as @interpolate(flat) https://www.w3.org/TR/WGSL/#interpolation
This commit is contained in:
parent
9b9b37e6f8
commit
76cec1b1fd
2 changed files with 21 additions and 21 deletions
|
|
@ -147,12 +147,12 @@ fn solid_fs_main(
|
|||
|
||||
struct GradientVertexInput {
|
||||
@location(0) v_pos: vec2<f32>,
|
||||
@location(1) colors_1: vec4<u32>,
|
||||
@location(2) colors_2: vec4<u32>,
|
||||
@location(3) colors_3: vec4<u32>,
|
||||
@location(4) colors_4: vec4<u32>,
|
||||
@location(5) offsets: vec4<u32>,
|
||||
@location(6) direction: vec4<f32>,
|
||||
@location(1) @interpolate(flat) colors_1: vec4<u32>,
|
||||
@location(2) @interpolate(flat) colors_2: vec4<u32>,
|
||||
@location(3) @interpolate(flat) colors_3: vec4<u32>,
|
||||
@location(4) @interpolate(flat) colors_4: vec4<u32>,
|
||||
@location(5) @interpolate(flat) offsets: vec4<u32>,
|
||||
@location(6) @interpolate(flat) direction: vec4<f32>,
|
||||
@location(7) position_and_scale: vec4<f32>,
|
||||
@location(8) border_color: vec4<f32>,
|
||||
@location(9) border_radius: vec4<f32>,
|
||||
|
|
@ -161,11 +161,11 @@ struct GradientVertexInput {
|
|||
|
||||
struct GradientVertexOutput {
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(1) colors_1: vec4<u32>,
|
||||
@location(2) colors_2: vec4<u32>,
|
||||
@location(3) colors_3: vec4<u32>,
|
||||
@location(4) colors_4: vec4<u32>,
|
||||
@location(5) offsets: vec4<u32>,
|
||||
@location(1) @interpolate(flat) colors_1: vec4<u32>,
|
||||
@location(2) @interpolate(flat) colors_2: vec4<u32>,
|
||||
@location(3) @interpolate(flat) colors_3: vec4<u32>,
|
||||
@location(4) @interpolate(flat) colors_4: vec4<u32>,
|
||||
@location(5) @interpolate(flat) offsets: vec4<u32>,
|
||||
@location(6) direction: vec4<f32>,
|
||||
@location(7) position_and_scale: vec4<f32>,
|
||||
@location(8) border_color: vec4<f32>,
|
||||
|
|
|
|||
|
|
@ -38,22 +38,22 @@ fn solid_fs_main(input: SolidVertexOutput) -> @location(0) vec4<f32> {
|
|||
|
||||
struct GradientVertexInput {
|
||||
@location(0) v_pos: vec2<f32>,
|
||||
@location(1) colors_1: vec4<u32>,
|
||||
@location(2) colors_2: vec4<u32>,
|
||||
@location(3) colors_3: vec4<u32>,
|
||||
@location(4) colors_4: vec4<u32>,
|
||||
@location(5) offsets: vec4<u32>,
|
||||
@location(1) @interpolate(flat) colors_1: vec4<u32>,
|
||||
@location(2) @interpolate(flat) colors_2: vec4<u32>,
|
||||
@location(3) @interpolate(flat) colors_3: vec4<u32>,
|
||||
@location(4) @interpolate(flat) colors_4: vec4<u32>,
|
||||
@location(5) @interpolate(flat) offsets: vec4<u32>,
|
||||
@location(6) direction: vec4<f32>,
|
||||
}
|
||||
|
||||
struct GradientVertexOutput {
|
||||
@builtin(position) position: vec4<f32>,
|
||||
@location(0) raw_position: vec2<f32>,
|
||||
@location(1) colors_1: vec4<u32>,
|
||||
@location(2) colors_2: vec4<u32>,
|
||||
@location(3) colors_3: vec4<u32>,
|
||||
@location(4) colors_4: vec4<u32>,
|
||||
@location(5) offsets: vec4<u32>,
|
||||
@location(1) @interpolate(flat) colors_1: vec4<u32>,
|
||||
@location(2) @interpolate(flat) colors_2: vec4<u32>,
|
||||
@location(3) @interpolate(flat) colors_3: vec4<u32>,
|
||||
@location(4) @interpolate(flat) colors_4: vec4<u32>,
|
||||
@location(5) @interpolate(flat) offsets: vec4<u32>,
|
||||
@location(6) direction: vec4<f32>,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue