You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bevy_pancam is enabled, so you should be able to drag the camera around, but we suggest just maximizing the window upon startup, in order to see everything clearly.
The basic setup here is: there's a large texture (the accumulation texture). We render into small squares (tile) of the accumulation texture sequentially. The accumulation texture has ClearColorConfig::None, which should in the background trigger a WGPU LoadOp::Load.
Every so often, we skip rendering a tile. The problem is that: when this skip occurs, the accumulation texture is cleared entirely.
A little more detail:
every tick, we check to see if an event to draw a tile has been received (initially we send one such event, to start off the process);
we check to see if a render complete event was written; if it was, we send the the next "draw a tile" event.
We used RenderDoc to see what is happening during a skip. It seems that an unnecessary texture clear is called. But we are not yet fully at home in RenderDoc, so perhaps are not getting as much info out of it as we might be able to.
We tried understanding the Bevy code to see where in the "lifecycle" of an Image the corresponding Texture might be cleared, but we found it very hard to trace the "lifecycle" of an Image and its corresponding Texture to figure this out.
We have been stumped by this for a while 😖
Any of the following would be welcome:
ideas on why the texture clear is happening, or where it is happening?
ideas on what we else we could try?
suggestions on what we can do to make the minimal not-working example easier to work with?
thoughts on whether you would like to see us upload RenderDoc captures?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Here's the minimal not working example.
bevy_pancam
is enabled, so you should be able to drag the camera around, but we suggest just maximizing the window upon startup, in order to see everything clearly.The basic setup here is: there's a large texture (the accumulation texture). We render into small squares (tile) of the accumulation texture sequentially. The accumulation texture has
ClearColorConfig::None
, which should in the background trigger a WGPULoadOp::Load
.Every so often, we skip rendering a tile. The problem is that: when this skip occurs, the accumulation texture is cleared entirely.
A little more detail:
every tick, we check to see if an event to draw a tile has been received (initially we send one such event, to start off the process);
if we are asked to draw stuff into a tile: we render some rects using bevy_prototype_lyon by using a camera targetting a 4096 x 4096 texture (the hi res image);
we take the 4096x4096 texture, and give it as a input (using Materials) to another camera which uses a viewport to target into
TILE_SIZE x TILE_SIZE
(whereTILE_SIZE = 64
) region of a large accumulation texture (here some downscaling happens); crucially, we queue sending of a rendering complete signal from the render deviceif a render complete signal was received we set
is_active
on the cameras responsible for rendering tofalse
, and we write a render complete eventwe check to see if a render complete event was written; if it was, we send the the next "draw a tile" event.
We used RenderDoc to see what is happening during a skip. It seems that an unnecessary texture clear is called. But we are not yet fully at home in RenderDoc, so perhaps are not getting as much info out of it as we might be able to.
We tried understanding the Bevy code to see where in the "lifecycle" of an
Image
the correspondingTexture
might be cleared, but we found it very hard to trace the "lifecycle" of anImage
and its correspondingTexture
to figure this out.We have been stumped by this for a while 😖
Any of the following would be welcome:
ideas on why the texture clear is happening, or where it is happening?
ideas on what we else we could try?
suggestions on what we can do to make the minimal not-working example easier to work with?
thoughts on whether you would like to see us upload RenderDoc captures?
Beta Was this translation helpful? Give feedback.
All reactions