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 {
|
struct OutlineViewUniform {
|
||||||
|
@align(16)
|
||||||
scale: vec2<f32>,
|
scale: vec2<f32>,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OutlineVertexUniform {
|
struct OutlineVertexUniform {
|
||||||
|
@align(16)
|
||||||
width: f32,
|
width: f32,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct OutlineFragmentUniform {
|
struct OutlineFragmentUniform {
|
||||||
|
@align(16)
|
||||||
colour: vec4<f32>,
|
colour: vec4<f32>,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,13 @@ use crate::{pipeline::OutlinePipeline, Outline};
|
||||||
|
|
||||||
#[derive(Clone, Component, ShaderType)]
|
#[derive(Clone, Component, ShaderType)]
|
||||||
pub struct OutlineVertexUniform {
|
pub struct OutlineVertexUniform {
|
||||||
|
#[align(16)]
|
||||||
pub width: f32,
|
pub width: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Component, ShaderType)]
|
#[derive(Clone, Component, ShaderType)]
|
||||||
pub struct OutlineFragmentUniform {
|
pub struct OutlineFragmentUniform {
|
||||||
|
#[align(16)]
|
||||||
pub colour: Vec4,
|
pub colour: Vec4,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue