Thanks DylserX!
About optimization, a few observations so far:
If you need pure perfect reflections, perfect copy of the scene, just like a mirror, it cost about 30/35 % fps at 1920x1080 resolution for both camera and capture.
If you don’t need it, for example in the case of water reflections where everything is always moving and distorted and you can get rid of some graphic options because it doesn’t really matter (or even get rid of reflections for some meshes) and your scene will still globally look good, it becomes much cheaper:
On my OLD COMPUTER, for example, for water reflections, using the small demo level of my last video:
With:
- 1 stationnary directionnal light and 1 skylight for the whole scene
- 1 capture2D with a render target of 1280x720 - and full screen resolution of 1920x1080
- Dynamic shadows, deferred lighting, antialiasing, reflections environnement and screen space reflections OFF (unchecked in capture2D settings)
- BP_Sky_Sphere available for the player camera but hidden for the capture and replaced by a cubemap texture mixed in postprocess material
with realtime reflections of the scene provided by the render target,
I get: 52/53 fps when the capture2D is deactivated and 48/50 fps when it captures the scene. Which is more than reasonnable imo. And it still looks good for water reflections.
If I switch back to deferred lighting (ON), I get 45/46 fps.
N.B: I still don’t exactly know what happens when it is OFF - have to make some researchs about it. Does it mean the engine uses forward lighting for the capture render?
If I switch back to BP_Sky_Sphere instead of a cubemap texture, I get 43/44 fps.
So I think there are ways to make all this useable at a reasonnable cost in most cases.
And If you need perfect reflections, it will be possible too.
So: good news.