pixels/src
Jay Oster 2a4ebbf19d
Fix half-pixel offsets in scaling renderer (#231)
* Fix half-pixel offsets in scaling renderer

- This bug was very subtle. It can be hard to notice!
- Context: When the scaling renderer transformation matrix is created,
  it needs to center the image within the border.
- The previous code always evaluated the translation to (0, 0)
- This PR makes half-pixel adjustments to the translation when needed,
  making it impossible to rasterize the texture on a half-pixel
  boundary.
- I spotted this while working on pixel-aspect-ratio support, but it can
  most easily be witnessed in the `conway` example by grabbing the top
  or bottom resize handle on the window and slow dragging it up and down
  by 1-pixel-at-a-time. When you hit a half-pixel bug the entire texture
  will change slightly; some pixels will become hidden or duplicated.

* Bump MSRV
2021-12-01 21:36:56 -08:00
..
builder.rs Initial WebGL2 support. (#218) 2021-11-16 11:37:56 -08:00
lib.rs Fix inverted Y-axis in window_pos_to_pixel() (#229) 2021-12-01 08:08:48 -08:00
renderers.rs Fix half-pixel offsets in scaling renderer (#231) 2021-12-01 21:36:56 -08:00