Performance loss while using multiple scene captures

Hello everyone,

I’m currently working on a project where players can observe the environment using periscopes. I’m using scene captures and render targets to simulate the mechanic, but I’m having trouble with performance.

I need to use three periscopes with different angles at the same time, but during playtests, I’ve noticed a dramatic drop in FPS. The game goes from 80-90 FPS down to 20-25 FPS.

Is there a way to optimize the performance drain caused by scene captures? Or is there another way to mimic the periscope mechanic without using scene capture?

Thanks for your help!

Using render targets as in plural is super expensive. You basically render the scene twice or more times. So it’s kind of running multiple games at the same time.

You need to lower the resolution of the captures or find a cheaper version to do this. I for instance created a shader that is cheap and gives you a periscope “kind of” view: Elias Wick | Lens

Depending on the process you probably want to increase culling when using a periscope, or something else to optimize the game further.

1 Like