pub fn update_resolution(
    mut event_reader: EventReader<WindowResized>,
    mut background: Query<&mut ShaderInputs>,
) {
    for event in event_reader.iter() {
        for mut node in background.iter_mut() {
            node.resolution = Vec2::new(event.width, event.height);
        }
    }
}
/// Updates resolution in ShaderInputs if window size changes

Updates resolution in ShaderInputs if window size changes
Updates resolution in ShaderInputs if window size changes
pub fn update_resolution(
    mut event_reader: EventReader<WindowResized>,
    mut background: Query<&mut ShaderInputs>,
) {
    for event in event_reader.iter() {
        for mut node in background.iter_mut() {
            node.resolution = Vec2::new(event.width, event.height);
        }
    }
}
pub fn update_resolution ( mut event_reader : EventReader < WindowResized > , mut background : Query < & mut ShaderInputs > , ) { for event in event_reader . iter ( ) { for mut node in background . iter_mut ( ) { node . resolution = Vec2 :: new ( event . width , event . height ) ; } } }
Updates resolution in ShaderInputs if window size changes
Updates resolution in ShaderInputs if window size changes
event_reader
EventReader<WindowResized>
background
Query<&mut ShaderInputs>