Draw a layer using a Render Target as background to Render Target 2 don't have the right size

Hi Everybody,

A small sphere inside a sphere with refraction (with thickness)

Duplicate the external sphere and reverse it to make a backsphere

Render workflow:
Render Target 1: draw skybox and backSphere
Render Target 2: draw interior sphere with render target 1 as refraction texture
*** bug => Draw a layer using Render Target 1 as background to Render Target 2
Main Window: draw external sphere with render target 2 as refraction texture

The layer don’t draw correctly the background render target to the second render target


Thanks :wink:

P.S.: @sebavan This is the bug I spoke about last week (VPS team)

I ll have a look today or it might tickle the curiosity of @Evgeni_Popov

Thanks for the repro

I have found the issue I believe, I will try to come up with a fix ASAP.

Will be fixed by Fix Texture Cache by sebavan · Pull Request #13057 · BabylonJS/Babylon.js · GitHub

1 Like

Thanks :wink:
It works perfectly