anthonyec / godot_little_camera_preview

🎥 Picture-in-picture style preview for both 2D and 3D cameras
MIT License
643 stars 10 forks source link

Fix portrait aspect ratio being stretched #8

Closed anthonyec closed 9 months ago

anthonyec commented 9 months ago

Problem

Portrait aspect ratio was poorly supported. It'd look stretched and the borders on the left and right would disappear

Changes

image

https://github.com/anthonyec/godot_little_camera_preview/assets/1451668/1f4586c8-bccd-4c0a-aff6-355d73cf1be0

Sub-pixel problems, notice the wiggle

https://github.com/anthonyec/godot_little_camera_preview/assets/1451668/1e1c2b04-668b-4a17-9832-bb7a0b73421f

Rounding to nearest pixel


Fixes: https://github.com/anthonyec/godot_little_camera_preview/issues/7