Error when using a shadow generator with a refreshRate set in Snapshot Rendering

When using a shadow generator with a refresh rate set in Snapshot Rendering, the rendering flickers and the following error is displayed in the console:

I attempted to reproduce this in the Playground but was unable to trigger the error. However, I was able to reproduce the rendering glitch.

here is the repro: Babylon.js Playground

Off topic:
Is there any point in setting the refresh rate for the shadow generator in Snapshot Rendering?

Even if there isn’t, in my use case, I need to dynamically toggle Snapshot Rendering on and off, so changing the refresh rate setting every time is cumbersome.

Thank you for this great framework!

I don’t get any error from your PG?

Thank you for reply.

It seems the issue occurs randomly. Would setting the refreshRate value to 30, for example, help reproduce the issue?

Recording of the reproduction:

a

Thanks, I was able to repro after refreshing the page.

I’m going to investigate.

1 Like

This PR will fix the problem:

1 Like

It looks like you posted your comment in the wrong place :slight_smile:
I think the correct link is here:

1 Like

Yes, sorry, I fixed the link above!

1 Like

Thank you for your quick fix!