cloudhead / cloudhead/rgx.legacy
Y-axis is Inverted
- Dominant language
- Rust
- Stars
- 193
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to understand the coordinate system in RGX and think that there is an inverted y-axis somewhere. I've modified the `sprite` example to only create one instance of the sprite in the batch as follows:
```
let rect =
Rect::new(0.0, 0.0, sw, sh);
batch.add(
anim.val(),
rect,
ZDepth::default(),
Rgba::new(0.5, 0.5, 0.5, 0.5),
1.0,
Repeat::default(),
);
batch.offset(mx, my);
```
then the pipeline is set to:
```
r.update_pipeline(
&pip,
kit::ortho(out.width, out.height, Origin::BottomLeft),
&mut frame,
);
```
However, the sprite then appears in the *upper* left (and is upside down). Similarly, if I change the origin in `kit::ortho` to `Origin::TopLeft`, the the sprite is in the BottomLeft.
This is on metal backend.
Contributor guide
Assessment
This issue has not been assessed yet.