mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-12 07:03:34 +00:00
adding depth buffer, ci skip
This commit is contained in:
@@ -4,9 +4,7 @@ module;
|
||||
struct VertIn
|
||||
{
|
||||
[location(0)] pos: vec4[f32],
|
||||
[location(1)] color: vec4[f32], // unused
|
||||
[location(2)] normal: vec4[f32], // unused
|
||||
[location(3)] uv: vec2[f32]
|
||||
[location(1)] uv: vec2[f32]
|
||||
}
|
||||
|
||||
struct VertOut
|
||||
@@ -24,13 +22,13 @@ struct ViewerData
|
||||
struct SpriteData
|
||||
{
|
||||
color: vec4[f32],
|
||||
position: vec2[f32]
|
||||
position: vec4[f32]
|
||||
}
|
||||
|
||||
external
|
||||
{
|
||||
[set(0), binding(0)] viewer_data: uniform[ViewerData],
|
||||
model : push_constant[SpriteData]
|
||||
model: push_constant[SpriteData]
|
||||
}
|
||||
|
||||
[entry(vert)]
|
||||
@@ -40,6 +38,6 @@ fn main(input: VertIn) -> VertOut
|
||||
let output: VertOut;
|
||||
output.uv = input.uv;
|
||||
output.color = model.color;
|
||||
output.pos = viewer_data.projection_matrix * vec4[f32](input.pos.xy + model.position, 0.0, 1.0);
|
||||
output.pos = viewer_data.projection_matrix * (input.pos + model.position);
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user