From f4572e2aca90ba6db18aec98a197c10b5a5a2b9f Mon Sep 17 00:00:00 2001 From: tcmal Date: Sun, 25 Aug 2024 17:44:22 +0100 Subject: fix(ui): mismatched shader types --- stockton-render/src/draw/ui/data/stockton.frag | 2 +- stockton-render/src/draw/ui/data/stockton.vert | 4 ++-- stockton-render/src/draw/ui/pipeline.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'stockton-render') diff --git a/stockton-render/src/draw/ui/data/stockton.frag b/stockton-render/src/draw/ui/data/stockton.frag index e5b2b4d..77685cc 100644 --- a/stockton-render/src/draw/ui/data/stockton.frag +++ b/stockton-render/src/draw/ui/data/stockton.frag @@ -6,7 +6,7 @@ layout(set = 0, binding = 0) uniform texture2D tex[8]; layout(set = 0, binding = 1) uniform sampler samp[8]; layout (location = 1) in vec2 frag_uv; -layout (location = 2) in flat int frag_col; +layout (location = 2) in flat uint frag_col; layout (location = 0) out vec4 color; diff --git a/stockton-render/src/draw/ui/data/stockton.vert b/stockton-render/src/draw/ui/data/stockton.vert index 7447fec..d84cc56 100644 --- a/stockton-render/src/draw/ui/data/stockton.vert +++ b/stockton-render/src/draw/ui/data/stockton.vert @@ -6,13 +6,13 @@ layout (push_constant) uniform PushConsts { layout(location = 0) in vec2 pos; layout (location = 1) in vec2 uv; -layout (location = 2) in int col; // rgba of u8s +layout (location = 2) in uint col; // rgba of u8s out gl_PerVertex { vec4 gl_Position; }; layout (location = 1) out vec2 frag_uv; -layout (location = 2) out int frag_col; +layout (location = 2) out uint frag_col; void main() { gl_Position = vec4( diff --git a/stockton-render/src/draw/ui/pipeline.rs b/stockton-render/src/draw/ui/pipeline.rs index 3b643e4..878d8cd 100644 --- a/stockton-render/src/draw/ui/pipeline.rs +++ b/stockton-render/src/draw/ui/pipeline.rs @@ -187,7 +187,7 @@ impl UIPipeline { let attributes: Vec = pipeline_vb_attributes!(0, size_of::() * 2; Rg32Sfloat, size_of::() * 2; Rg32Sfloat, - size_of::() * 4; Rgba8Uint + size_of::() * 4; R32Uint ); // Rasterizer -- cgit v1.2.3