Validation workaround `prime-effect-layers`: extra frame needed before capture when effect layers exist

Abierto
#2,006 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@bkaradzic-microsoft ya está trabajando en esto.

Desde el 3/11/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Affected tests (10)

  • Glow layer and LODs
  • Attractors
  • Glow layer and LODs
  • Prepass SSAO + highlight layer
  • sphere-with-custom-shader-to-display-wireframe-using-glow-layer
  • dissolve-effect-with-node-material-and-glow-layer
  • Glow layer with vertex alpha
  • Particles - Attractors
  • Selection outline layer with instances
  • Selection outline layer with instances and LOD

What the workaround does

Renders one extra frame before capture when the scene has effect layers (GlowLayer / HighlightLayer). Without it, the first captured frame is missing the glow/highlight contribution on BN. Introduced in #1913.

Recommended fix

Root cause is not confirmed. Capture the first frame with RenderDoc and compare with the second:

  • If the effect-layer RTT is rendered after the main pass in the same frame (view ordering / submission order in NativeEngine / bgfx view IDs), fix view ordering in BN so RTTs are submitted before the views that sample them.
  • If the effect layer's isReady() returns true before its effects/merge effect are compiled, fix readiness in Babylon.js (EffectLayer.isReady / _shouldRender).
    Then remove the workaround.

Workaround implementations live in Apps/Playground/Scripts/validation_native.js (WORKAROUNDS map); tests opt in via the workarounds array in Apps/Playground/Scripts/config.json. See Documentation/AddingNewValidationTests.md.

Lenguaje dominante
C++
Estrellas
931
Forks
169
Merge medio
2 d 17 h
PR fusionados (30 d)
66

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de BabylonJS/BabylonNative

Todos los issues de BabylonJS/BabylonNative

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.