chettoy / apexsky

https://apex.chettoy.com
GNU General Public License v3.0
144 stars 80 forks source link

Overlay aspect ratio #152

Closed pplegends closed 2 months ago

pplegends commented 2 months ago

Can I use the overlay in a different aspect ratio (other than 16:9)? How can I do that?

chettoy commented 2 months ago

If you are using a resolution other than 1920x1080, save the configuration and then modify the screen_width and screen_height in settings.toml and reload the configuration.

pplegends commented 2 months ago

I tried changing the resolution to 1680x1050 in the game and edited the resolution in settings.toml. I got this error when trying to run the overlay: Hello, world! 2024-09-10T11:19:18.468496Z DEBUG apexsky_overlay::overlay::asset: Loading Blob... at apexsky_overlay/src/overlay/asset.rs:89

thread '' panicked at /home/pplegends/.cargo/registry/src/index.crates.io-6f17d22bba15001f/wgpu-0.20.1/src/backend/wgpu_core.rs:2996:5: wgpu error: Validation Error

Caused by: In a RenderPass note: encoder = <CommandBuffer-(2635, 1, Vulkan)> In a pass parameter note: command buffer = <CommandBuffer-(2635, 1, Vulkan)> Attachments have differing sizes: the depth attachment's texture view has extent (1680, 1050, 1) but is followed by the color attachment at index 0's texture view which has (1920, 1080, 1)

note: run with RUST_BACKTRACE=1 environment variable to display a backtrace Encountered a panic in system bevy_render::renderer::render_system!

chettoy commented 2 months ago

This is probably because overlay is full screen, so you can't set the resolution to a different value than the screen resolution. Are you running the game in windowed mode? If so you may need to consider modifying overlay to run in windowed mode as well, and resizing it to the same size and position as the game window.

pplegends commented 2 months ago

My game runs in fullscreen thou