Validation workaround `opaque-clear-alpha`: framebuffer alpha differs from WebGL with opaque clear

オープン
#2,007 コメント 0 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@bkaradzic-microsoft がすでに取り組んでいます。

2026年11月3日 から。

評価

この issue はまだ評価されていません。

説明

Affected tests (15)

  • Ribbon morphing
  • Solid particle system
  • RH billboard
  • Particle Helper
  • Area Lights - Standard Material
  • Textured - Area Lights - Standard Material
  • Textured - Area Lights - PBR
  • Area Lights - PBR
  • Enable disable post process
  • Prepass SSAO + depth of field
  • Prepass SSAO + on/off post-process
  • Particles - Multiply Blend
  • Particles - Helper - Sun
  • Particles - Helper - Smoke
  • Particles - Helper - Fire

What the workaround does

When the scene clears with an opaque color but the read-back image contains alpha < 1, the harness skips compositing over the canvas background (browser composites the canvas with the page). Without it, BN screenshots differ where blended geometry writes alpha < 1. Introduced in #1913.

Recommended fix

Likely the alpha channel of blended draws differs from WebGL (separate alpha blend factors / alphaMode mapping). Compare per-pixel alpha of the BN readback with WebGL readPixels for one affected test; fix the alpha blend state mapping in NativeEngine (setAlphaMode → bgfx BGFX_STATE_BLEND_FUNC_SEPARATE) so alpha matches WebGL. Then the harness can composite identically to the browser and the workaround can be removed.


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.

主要言語
C++
スター
931
フォーク
169
平均マージ
2日 17時間
マージ済み PR(30日)
66

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

BabylonJS/BabylonNative のほかの issue

BabylonJS/BabylonNative の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。