| 5 | #[repr(C)] |
| 6 | #[derive(Copy, Clone, Debug, bytemuck::Pod, bytemuck::Zeroable)] |
| 7 | pub(crate) struct CameraUniform { |
| 8 | pub view_proj: [[f32; 4]; 4], |
| 9 | // (2/width, 2/height, reserved0, reserved1) - for screen-space sizing (markers) |
| 10 | pub pixel_to_clip: [f32; 4], |
| 11 | // (world_units_per_pixel_x, world_units_per_pixel_y, reserved0, reserved1) - for world-space patterns (lines) |
| 12 | pub pixel_to_world: [f32; 4], |
| 13 | } |
| 14 | |
| 15 | impl CameraUniform { |
| 16 | pub(crate) fn update(&mut self, camera: &Camera, viewport_width: u32, viewport_height: u32) { |
nothing calls this directly
no outgoing calls
no test coverage detected