diff options
| author | 2023-09-07 05:53:50 +0200 | |
|---|---|---|
| committer | 2023-09-07 05:53:50 +0200 | |
| commit | d82c8b59e6a3e7743017c7674766dfa5bdb7c6f0 (patch) | |
| tree | 538267840904710953831d0c5477d4cc5ee3a33d /wgpu/src/shader/triangle | |
| parent | ccc787089225d0edb842241dc04abf0393fb02c7 (diff) | |
| parent | 87800095e27353557adb39ef42ee6f82a0075bc1 (diff) | |
| download | iced-d82c8b59e6a3e7743017c7674766dfa5bdb7c6f0.tar.gz iced-d82c8b59e6a3e7743017c7674766dfa5bdb7c6f0.tar.bz2 iced-d82c8b59e6a3e7743017c7674766dfa5bdb7c6f0.zip | |
Merge pull request #2071 from Davidster/wgpu_webgpu_support
use @interpolate(flat) attribute as per the WebGPU spec
Diffstat (limited to '')
| -rw-r--r-- | wgpu/src/shader/triangle.wgsl | 20 | 
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>,  } | 
