diff --git a/crates/flare-shader/src/lib.rs b/crates/flare-shader/src/lib.rs index ed31d83..95e1bb0 100644 --- a/crates/flare-shader/src/lib.rs +++ b/crates/flare-shader/src/lib.rs @@ -257,12 +257,12 @@ pub fn main_cs( point = next_transform(&mut rng, transform_weight, transforms).apply(variations, point); } - // ...because `.max()` has compilation issues. - let max_dimension = if image_constants.accum_width > image_constants.accum_height { image_constants.accum_width } else { image_constants.accum_height }; + // ...because `.min()` has compilation issues. + let min_dimension = if image_constants.accum_width < image_constants.accum_height { image_constants.accum_width } else { image_constants.accum_height }; // Fixed camera, should be provided by a uniform in the future let camera = CameraConstants { - scale: max_dimension as f32 / 4.0, + scale: min_dimension as f32 / 4.0, zoom: 2.0, rotate: 0.0, offset_x: 0.5,