Apparent regression in multipass rendering demo

Hey all,

apparently there were some regressions in Render Target Texture With Multiple Passes | Babylon.js Documentation.

Here’s the original version, developed for v4: Babylon.js Playground
Current version on docs, which seems to have been updated to take advantage of v5: https://playground.babylonjs.com/#S1W87B#20

How to reproduce: just run the first demo with 4.2.1 and latest on the original demo. The same behavior happens on the second one, although it doesn’t run on v4 due to a new API call.

Regressions:

  1. The robots are rotated in v5.x
  2. Apparently there’s considerable performance loss. I get around 60fps on v4, but only 20-30fps on v5 (tested on Firefox).

Thank you!

The new version is actually both faster on cpu and gpu for me (new at the bottom):

and the gpu commands are also smaller

image in the new one vs
image in the old one.

About the model let s add @bghgary to the thread but bear with him as he is in vacation this week.

1 Like

This is because of the changes to the way glTF skeletons are being loaded. I’ve documented the current behavior here. Unfortunately, this will break some scenarios that isn’t taking the parent transform into account, like the linked PG which only created instances of the mesh and not the parent nodes.

Here is the proper way to instance a model: Multi pass with optimizations | Babylon.js Playground (babylonjs.com)

3 Likes

You are the best @bghgary !!!

Doc fixed here: Update PG link for multipass by bghgary · Pull Request #620 · BabylonJS/Documentation (github.com)

1 Like

Thank you @bghgary! Minor rant, scaling was being applied twice on your update, fixed on https://playground.babylonjs.com/#S1W87B#41

2 Likes