#One time render to texture

2 messages · Page 1 of 1 (latest)

woeful pond
#

I have the camera rendering to texture fine, but I don't need it rendering each frame, I'd like to render one pass, keep the texture render, and remove the camera.

When I add a system to remove the camera nothing renders. Thanks!

woeful pond
#
fn finish(
        mut commands: Commands,
        temps: Query<Entity, With<Temp>>,
        time: Res<Time>
    ) {
        if time.elapsed().as_secs_f32() > 1. {
            for e in temps.iter() {
                commands.entity(e).despawn();
            }
        }
    }