Skip to content

Commit

Permalink
Fix aspect ratio
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Nov 4, 2024
1 parent abff597 commit c0d515e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion experiments/2024-10-30/src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Renderer {
.ok_or_else(|| anyhow!("Failed to get default surface config"))?;
surface.configure(&device, &config);

let aspect_ratio = 1.;
let aspect_ratio = size.width as f32 / size.height as f32;
let transform_buffer =
device.create_buffer_init(&wgpu::util::BufferInitDescriptor {
label: None,
Expand Down

0 comments on commit c0d515e

Please sign in to comment.