Replies: 3 comments 3 replies
-
This requires implementing hardware readbacks to be done in a fast way, which has a 2-3 frame delay. There is no way to have the viewport data available on the next frame on the CPU without incurring a significant slowdown due to GPU-CPU synchronization. |
Beta Was this translation helpful? Give feedback.
-
If it is just a few frames delay, I really don't mind. |
Beta Was this translation helpful? Give feedback.
-
Up, if it is possible to only get a simple float value indicative of luminance would be alright, if it's not already available somewhere, a value something like .auto_exposure_* you can get by script (didn't find it in the docs). I gave a brief look at the servers/rendering/renderer_rd/renderer_scene_render_rd.cpp where the auto-exposure is launched from (I think), it uses luminance buffers. Is there a way to access that ? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I try to get via script the previous frame rendered, or a mipmap version of it, each frame, to analyze it and use that to adjust some of my game's parameters.
In the shaders, the last frame is available with SCREEN_TEXTURE, it's easy and fast.
But to get it via get_viewport().get_texture() it's too slow.
I created a ColorRect with a material using SCREEN_TEXTURE to show it and capture it in a SubViewport, with every combination with BackBufferCopy, SubViewportContainer, it doesn't work; no 3D or 2D object is shown in the SubViewport, like it is separated from the other objects. The BackBufferCopy object copies what is in the current Viewport/SubViewport, not the root one which I want.
Beta Was this translation helpful? Give feedback.
All reactions