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

Đang mở
#2,006 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@bkaradzic-microsoft đang làm issue này rồi.

Từ ngày 3/11/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
C++
Star
931
Fork
169
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
66

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của BabylonJS/BabylonNative

Tất cả issue của BabylonJS/BabylonNative

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.