mirror of
https://github.com/seekrs/MacroLibX.git
synced 2026-01-11 22:53:34 +00:00
adding transformations
This commit is contained in:
@@ -21,8 +21,8 @@ struct ViewerData
|
||||
|
||||
struct SpriteData
|
||||
{
|
||||
color: vec4[f32],
|
||||
position: vec2[f32]
|
||||
model_matrix: mat4[f32],
|
||||
color: vec4[f32]
|
||||
}
|
||||
|
||||
external
|
||||
@@ -34,11 +34,11 @@ external
|
||||
[entry(vert)]
|
||||
fn main(input: VertIn) -> VertOut
|
||||
{
|
||||
let position: vec4[f32] = vec4[f32](input.pos.xy + model.position, 1.0, 1.0);
|
||||
let position: vec4[f32] = vec4[f32](input.pos.xy, 1.0, 1.0);
|
||||
input.uv *= -1.0;
|
||||
let output: VertOut;
|
||||
output.uv = input.uv;
|
||||
output.color = model.color;
|
||||
output.pos = viewer_data.projection_matrix * position;
|
||||
output.pos = viewer_data.projection_matrix * model.model_matrix * position;
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user