Repository navigation
Make camera rotation validation tests independent of LookDirection handedness - #1951
Open
bkaradzic-microsoft wants to merge 1 commit into
Open
bkaradzic-microsoft wants to merge 1 commit into
bkaradzic-microsoft wants to merge 1 commit into
Conversation
Babylon.js #18932 (first released in 9.31.0) changed what Quaternion.FromLookDirectionLH/RH return for a given forward vector. Babylon.js updated its own visualization config for the four "GLTF Serializer camera rotation animation" tests. The Native tests job in Babylon.js CI runs Babylon Native's config.json against the current Babylon.js build, so these tests now fail there (about 12.5% pixel difference, the model faces away from the camera). Babylon Native itself still pins babylonjs 9.29.0, which has the old behavior, so the Babylon.js replacement cannot be copied as is. Instead, detect the behavior at runtime: the new LookDirection returns identity for FromLookDirectionLH(Forward, Up), and in that case use Vector3.Backward to keep the original orientation. Verified locally on tests 227-230 with babylonjs 9.29.0 and 9.31.0 (4/4 pass on each); the previous config fails on 9.31.0 at 12.46%. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 60c2ec68-6de1-445d-9fc9-b699db737eae
bkaradzic-microsoft
requested review from
bghgary
and
a balanced review from Copilot
October 16, 2026 22:09
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The replacements preserve harness parsing and handle both handedness behaviors, with no unresolved findings.
No open issues 🎉
What changed in this PR
Makes Native camera rotation validation compatible with both old and corrected Babylon.js LookDirection behavior.
Changes:
- Adds runtime handedness detection to all four GLTF Serializer camera rotation fixtures.
- Selects forward or backward vectors while preserving the harness’s comma-delimited replacement format.
| File | Description |
|---|---|
| Apps/Playground/Scripts/config.json | Updates four camera rotation fixtures for cross-version compatibility. |
Review effort: Balanced
bkaradzic-microsoft
enabled auto-merge (squash)
October 16, 2026 23:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Babylon.js #18932 ("fix(math)!: correct LookDirection handedness", first released in 9.31.0) changed what
Quaternion.FromLookDirectionLH/RHreturn. Babylon.js updated thereplacestrings for the four GLTF Serializer camera rotation animation tests in its own visualization config.The Native tests (experimental) job in Babylon.js CI runs this repo's
Apps/Playground/Scripts/config.jsonagainst the current Babylon.js build. Under that build, these four tests render only the clear color (about 12.45% pixel difference) and fail. The step'sretryCountOnTaskFailure: 3then re-runs the whole suite until the job hits its 35-minute timeout. This happens on Babylon.js master and on every PR, for example build 60952 for #19001:ran=471 passed=467 failed=4.Babylon Native still pins babylonjs 9.29.0, which has the old behavior, so the Babylon.js
replacestrings can't be copied as-is.Change
The
replacefor the four tests now detects the behavior at runtime. The new LookDirection returns identity forFromLookDirectionLH(Forward, Up). In that case the test usesVector3.Backward, matching the Babylon.js config change; otherwise it keepsVector3.Forward.The replacement code contains no commas, because the harness splits
replaceon commas. The function arguments are built withpushand passed with spread instead.Verification
Win32 D3D11 V8 Playground, tests 227-230:
Once babylonjs is bumped to 9.31.0 or later, this can be simplified to the plain Babylon.js
replacestrings.Related: BabylonJS/Babylon.js#19006 (raises the Native CI timeout) and #1950 (Shadow depth wrappers).