Skip to content

DO-NOT-MERGE: validate BJS #18355 heightmap readiness fix against BN CI#1668

Closed
bghgary wants to merge 7 commits into
BabylonJS:masterfrom
bghgary:bghgary/validate-heightmap-ready
Closed

DO-NOT-MERGE: validate BJS #18355 heightmap readiness fix against BN CI#1668
bghgary wants to merge 7 commits into
BabylonJS:masterfrom
bghgary:bghgary/validate-heightmap-ready

Conversation

@bghgary

@bghgary bghgary commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

DO-NOT-MERGE — Validation PR for BabylonJS/Babylon.js#18355

Purpose

Validate that the Babylon.js heightmap-readiness fix (BJS PR #18355) eliminates the Light Projection Texture (LPT) flakiness in BabylonNative CI before bumping to the published version.

Background

On Ubuntu_GCC_JSC the LPT validation test (#CQNGRK#0) fails intermittently — the rendered output is a solid clear-color image (no geometry), and CI logs show executeWhenReady firing ~144ms before any texture is created on the GPU. Root cause:

  • scene.isReady() skips meshes with subMeshes.length === 0.
  • CreateGroundFromHeightMap creates a GroundMesh with no submeshes, populating them only in the async Tools.LoadImage callback.
  • CreateGroundFromHeightMap does not call scene.addPendingData.
  • Net: scene.isReady returns true while the heightmap is still loading → executeWhenReady fires on an empty scene → snapshot → fail.

Changes (all temporary, all reverted before any real merge)

  • Apps/Playground/Scripts/validation_native.js: monkey-patches BABYLON.Mesh.CreateGroundFromHeightMap to register pending scene data around the async heightmap load. Mirrors the fix in Babylon.js#18355. Will be removed once BN bumps to a BJS version containing the fix.
  • Apps/Playground/Scripts/config.json: replaced the full visual-test suite with 20 copies of the LPT test to maximise per-run signal.
  • .github/workflows/ci.yml: reduced the matrix to only Ubuntu_GCC_JSC (the flakiest configuration) to conserve CI resources.

Mergeable

DO-NOT-MERGE

Status

Once the BN CI here shows LPT stable across multiple re-runs, the validation confirms the fix. Next steps:

  1. Close this validation PR.
  2. Merge Babylon.js#18355.
  3. Bump BN to the published BJS version containing the fix (extend Bump Babylon.js from 9.0.0 to 9.3.4 #1667).

[Created by Copilot on behalf of @bghgary]

bghgary and others added 7 commits April 20, 2026 14:57
Picks up the light projection texture readiness fix
(BabylonJS/Babylon.js#18255, merged 2026-04-18, released in 9.3.2).

This should resolve the Light Projection Texture UnitTests failure seen on
Win32_x64_D3D11 CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Babylon.js 9.3.3 contains the fix for light projection texture readiness (BabylonJS/Babylon.js#18255) that was not yet in 9.3.2, which should resolve the Win32_x64_V8_D3D11 Light Projection Texture UnitTests failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
DO NOT MERGE. This branch exists solely to validate the fix in
BabylonJS/Babylon.js#18355 against BabylonNative CI.

Changes (all temporary):
- validation_native.js: monkey-patch BABYLON.Mesh.CreateGroundFromHeightMap
  to register pending scene data around the async heightmap load, mirroring
  the fix in the BJS PR. Remove once BN bumps to a BJS version containing
  the real fix.
- config.json: replaced the full test suite with 20 copies of the Light
  Projection Texture test so each CI run provides high-signal data on LPT
  stability.
- ci.yml: reduced matrix to only Ubuntu_GCC_JSC (the most-reliably-flaky
  configuration) to conserve CI resources.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
bghgary added a commit that referenced this pull request Apr 21, 2026
## Summary

Bump Babylon.js from `9.0.0` to `9.3.4` across all `package.json` /
`package-lock.json` files under `Apps/`.

## Motivation

Recent CI runs (e.g. on #1666) show `Win32_x64_D3D11` intermittently
failing on the `Light Projection Texture` UnitTests case:

```
[Log] Running Light Projection Texture
[Log] First pixel off at 182856: Value: (51, 51, 53) - Expected: (46, 22, 16)
[Log] Pixel difference: 170840 pixels.
[Log] failed
##[error]Process completed with exit code -1.
```

Two upstream readiness bugs combine to produce this flake, and both need
to land to remove it:

- **BabylonJS/Babylon.js#18255** — "Fix material readiness to gate on
light texture readiness." Shipped in Babylon.js 9.3.2.
- **BabylonJS/Babylon.js#18355** — heightmap `CreateGroundFromHeightMap`
readiness (the async image load was not gated by
`addPendingData`/`removePendingData`, so `scene.isReady()` could return
true before the heightmap was uploaded). Shipped in Babylon.js 9.3.4.

Earlier 9.3.2 / 9.3.3 bumps on this branch picked up #18255 but the
flake persisted because the heightmap race (#18355) was still present.
Bumping to `^9.3.4` picks up both.

## Changes

- `Apps/package.json` + lockfile: bump `babylonjs`,
`babylonjs-gltf2interface`, `babylonjs-gui`, `babylonjs-loaders`,
`babylonjs-materials`, `babylonjs-serializers` to `^9.3.4`.
- `Apps/UnitTests/JavaScript/package.json`: bump `babylonjs`,
`babylonjs-materials`, `@babylonjs/core`, `@babylonjs/materials` to
`^9.3.4`.
- `Apps/PrecompiledShaderTest/JavaScript/package.json` + lockfile: bump
`@babylonjs/core` to `^9.3.4`.

No code changes — dependency bump only.

## Verification

CI on this PR is expected to go green on `Win32_x64_D3D11 Light
Projection Texture` where it was previously flaky. Validated out-of-band
on #1668 (monkey-patched 9.3.3 → 9.3.4 behavior) running LPT ×20 × 6
configs = 120/120 on Ubuntu_GCC_JSC.

---

[Created by Copilot on behalf of @bghgary]

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@bghgary

bghgary commented Apr 21, 2026

Copy link
Copy Markdown
Contributor Author

Validation complete — heightmap readiness fix (BabylonJS/Babylon.js#18355) shipped in Babylon.js 9.3.4 and has been consumed on master via #1667. Closing.

@bghgary bghgary closed this Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant