Hello all - I am taking a look at the new headless_renderer example in the repo: https://github.com/bevyengine/bevy/blob/main/examples/app/headless_renderer.rs
I have a use case where I would need to set the dimensions of the output image based on something outside of bevy. However, just changing the width by 1 or 2 (on line 69 in the AppConfig struct) results in output that is garbled/misaligned (examples attached).
I sort of suspected that this had to do with bevy's default output, which doesn't match the resolution in the example but does have the same aspect ratio. So I changed the primary_window in WindowPlugin from None to a window with the config-defined dimensions:
primary_window: Some(Window {
resolution: WindowResolution::new(config.width as f32, config.height as f32),
..default()
}),
...but it didn't change the output at all (and in fact no window appears, I assume because the camera's target is still set to a texture). I also tried changing the width by increments of 4, 8, etc, in case it was some bit encoding issue I was missing but still no luck.
Is there something I'm overlooking here? Somewhere else where the aspect ratio is hard-coded?
Thanks.