From 3c9f7c4eb1346e2fc0c39306d6b28f261b4ccbcc Mon Sep 17 00:00:00 2001 From: c-u Date: Sun, 6 Aug 2023 17:37:42 +0200 Subject: [PATCH] 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 --- src/error.rs | 2 ++ src/shader.wgsl | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/error.rs b/src/error.rs index 0de51f9..5bc30a6 100644 --- a/src/error.rs +++ b/src/error.rs @@ -40,3 +40,5 @@ impl Display for RenderError { } } } + +impl Error for RenderError {} diff --git a/src/shader.wgsl b/src/shader.wgsl index b60c8b6..53f78ce 100644 --- a/src/shader.wgsl +++ b/src/shader.wgsl @@ -12,7 +12,7 @@ struct VertexOutput { @invariant @builtin(position) position: vec4, @location(0) color: vec4, @location(1) uv: vec2, - @location(2) content_type: u32, + @location(2) @interpolate(flat) content_type: u32, }; struct Params {