Fix error on platforms that require 16 byte aligned uniforms such as WebGL.
This commit is contained in:
parent
f0d5a92fbd
commit
2ac918d63a
|
@ -6,14 +6,17 @@ struct VertexInput {
|
|||
};
|
||||
|
||||
struct OutlineViewUniform {
|
||||
@align(16)
|
||||
scale: vec2<f32>,
|
||||
};
|
||||
|
||||
struct OutlineVertexUniform {
|
||||
@align(16)
|
||||
width: f32,
|
||||
};
|
||||
|
||||
struct OutlineFragmentUniform {
|
||||
@align(16)
|
||||
colour: vec4<f32>,
|
||||
};
|
||||
|
||||
|
|
|
@ -17,11 +17,13 @@ use crate::{pipeline::OutlinePipeline, Outline};
|
|||
|
||||
#[derive(Clone, Component, ShaderType)]
|
||||
pub struct OutlineVertexUniform {
|
||||
#[align(16)]
|
||||
pub width: f32,
|
||||
}
|
||||
|
||||
#[derive(Clone, Component, ShaderType)]
|
||||
pub struct OutlineFragmentUniform {
|
||||
#[align(16)]
|
||||
pub colour: Vec4,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue