Reflective materials showing up black in RenderToCubeMap 2019.2 standard pipeline

I’m using Camera.RenderToCubeMap and RenderTexture.ConvertToEquiRect to create equirectangular panoramas.

This works well except it doesn’t seem to take account of Reflection Probes with reflective materials.

Top image is in the editor, bottom image is from the CubeMap. Sample source below…

Hoping someone can help out. Thanks :slight_smile:

            RenderTexture cubeMap = new RenderTexture(cubemapSize, cubemapSize, 24);
            cubeMap.dimension = UnityEngine.Rendering.TextureDimension.Cube;


            RenderTexture equiRect = new RenderTexture(2 * cubemapSize, cubemapSize, 24);
            equiRect.dimension = UnityEngine.Rendering.TextureDimension.Tex2D;


            var tex2 = toTexture2D(equiRect);

From Remy_Unity

I might be wrong here, but I suspect that Camera.RendertoCubeMap has some safeguard to avoid recursive rendering, that would explain why the reflection probes are missing in the capture.