Context loss when applying prefilter

Hi there,

I got a bug that is likely not the fault of BBJS itself, but I share it anyway.

I got it reproduced here:
What I’ve done is creating a ReflectionProbe, rendering it, cloned its reflectionTexture, and then applying HDRFiltering prefilter on the clone. At that point it cause a context loss on my computer, which is powered by an Intel Core i5 8265U CPU and mesa drivers (version 22.1.1) under Linux. I’ve experienced this under both Chromium and Firefox.

If you uncomment the line 43 of the above link, you may get a context loss like me, or not at all.

I’ve tried this on two computers so far, and it looks like it comes from the Intel driver, as the other computer is running AMD integrated graphics.

The clone is not needed and prefiltering while your game is running on a large texture (512) will need lots of resources. Could you try without the clone and with a 256 or 128 cube map size ?

Well we do this as baking, so we are okay with taking the time to do it. I’ll try with a lower value as you recommended !

Well, it looks like just using a lower size for the Reflection Probe is doing the trick !
How could I know if I am using higher than supported size beforehand ? is there a way in Babylon to ask this kind of thing ?

Not really, I just know the process is really heavy and as it sounds to be specific to your env, I thought it was worth a try.