Misusing the rendering pipeline

I have some code, which emulated a physics-based refraction texture via a bunch of virtual cameras randering to a Skybox target texture attached to the lens.

For this I was making a ReflectionProbe:
let lensTexture = new BABYLON.ReflectionProbe("main", 512, scene);
and called the
lensTexture._renderTargetTexture._renderingManager.render function.

more specifically here is a code snipped, how I used to trigger the rendering mechanism In my renderTargetTexture.customRenderFunction:

lookAtFunction(lensTexture.position, lensTexture._target, my_up, lensTexture._viewMatrix);

scene.setTransformMatrix(lens_cam.getViewMatrix(), lens_cam.getProjectionMatrix()); 

renderTargetTexture._renderingManager.render(old_customRenderFunction, null, renderTargetTexture.renderParticles, renderTargetTexture.renderSprites);

I know this was somewhat of a hack. However, now in Babylon 8 (or even previous versions?), the _renderingManager does not seem to exist, so the last line fails.
Is there a replacement for it? How can I trigger this rendering now?

I am sorry that I am unable to provide a specific Playground for demonstrating this issue.

The rendering manager is now a (private) member of the (private) _objectRenderer.
You can also check the render function of the objectRenderer, maybe it is enough for your use case?

3 Likes

Thank you so much! Just replacing all occurances of _renderingManager with _objectRenderer._renderingManager fixed the problem and the code runs fine.

2 Likes