summaryrefslogtreecommitdiffstats
path: root/wgpu/src/shader/triangle.wgsl
diff options
context:
space:
mode:
authorLibravatar David Huculak <davidhuculak5@gmail.com>2023-09-03 19:32:38 -0400
committerLibravatar David Huculak <davidhuculak5@gmail.com>2023-09-03 19:32:38 -0400
commit76cec1b1fd533dda37aa53c40ef7665ed3b406b6 (patch)
treecf837ba492ca5e47f05124086e2ce183cda274fc /wgpu/src/shader/triangle.wgsl
parent9b9b37e6f83b5e5a8811feb17b484c6b11fa3b8b (diff)
downloadiced-76cec1b1fd533dda37aa53c40ef7665ed3b406b6.tar.gz
iced-76cec1b1fd533dda37aa53c40ef7665ed3b406b6.tar.bz2
iced-76cec1b1fd533dda37aa53c40ef7665ed3b406b6.zip
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
Diffstat (limited to '')
-rw-r--r--wgpu/src/shader/triangle.wgsl20
1 files changed, 10 insertions, 10 deletions
diff --git a/wgpu/src/shader/triangle.wgsl b/wgpu/src/shader/triangle.wgsl
index 9f512d14..3a2b9845 100644
--- a/wgpu/src/shader/triangle.wgsl
+++ b/wgpu/src/shader/triangle.wgsl
@@ -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>,
}