Add Interpolation attribute for the VertexOutput and add Error trait implementation for RenderError (#49)

* impl trait Error for RenderError

* fix shader for usage in web
This commit is contained in:
c-u 2023-08-06 17:37:42 +02:00 committed by GitHub
parent 33c64acbcf
commit 3c9f7c4eb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -40,3 +40,5 @@ impl Display for RenderError {
} }
} }
} }
impl Error for RenderError {}

View file

@ -12,7 +12,7 @@ struct VertexOutput {
@invariant @builtin(position) position: vec4<f32>, @invariant @builtin(position) position: vec4<f32>,
@location(0) color: vec4<f32>, @location(0) color: vec4<f32>,
@location(1) uv: vec2<f32>, @location(1) uv: vec2<f32>,
@location(2) content_type: u32, @location(2) @interpolate(flat) content_type: u32,
}; };
struct Params { struct Params {