pub fn from_render_target_size(
        render_target_size: RenderTargetSize,
        scale_factor: f32,
    ) -> Self {
        EguiTransform {
            scale: Vec2::new(
                2.0 / (render_target_size.width() / scale_factor),
                -2.0 / (render_target_size.height() / scale_factor),
            ),
            translation: Vec2::new(-1.0, 1.0),
        }
    }
Calculates the transform from window size and scale factor.
src/render_systems.rs