Combined native-engine GL fixes (re-enables 10 validation tests)#1752
Draft
bkaradzic-microsoft wants to merge 7 commits into
Draft
Combined native-engine GL fixes (re-enables 10 validation tests)#1752bkaradzic-microsoft wants to merge 7 commits into
bkaradzic-microsoft wants to merge 7 commits into
Conversation
This EffectRenderer fullscreen-pass test rendered all-black on Native because the native engine did not honor depth-test toggles made through engine.depthCullingState.depthTest (used by EffectRenderer). Fixed upstream in the native engine (BabylonJS/Babylon.js#18558); re-enable the test here. Depends on a babylonjs dependency bump that includes the fix. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…armonics loadCubeTexture now accepts a single self-contained cubemap container (all six faces + mips), decoded via bimg::imageParse, and uploads sides 0-5 x mips. ComputeCubeSphericalPolynomial derives the diffuse-IBL spherical harmonics from the top-mip faces (port of CubeMapToSphericalPolynomialTools) and returns the polynomial coefficients to JS. This is done natively because the WebGL upload and cube-readback paths are unimplemented on native and .dds stores no SH. Re-enables 6 prefiltered-environment PBR validation tests. Pairs with BabylonJS/Babylon.js#18560 (native createCubeTexture dispatch for single-URL containers). Depends on a babylonjs dependency bump including it. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…nces tests) Render-to-cubemap on the native engine so ReflectionProbe and point-light cube shadow maps render instead of dereferencing the null WebGL context. - InitializeTexture: optional isCube param -> Texture::CreateCube. - CreateFrameBuffer: optional layer param so the color attachment targets a single cube face (bgfx::Attachment layer); the JS side creates one framebuffer per face and binds the matching one per face. Re-enables the "Shadows with instances in left/right handed system" validation tests that previously crashed/hung. Requires the paired Babylon.js change (native cube render target JS overrides); CI stays red until a babylonjs npm with that change is published and the dep bumped here. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ureData) updateTextureData previously threw "not implemented" on Native. Implement it so sub-rectangle texture updates work. - Add NativeEngine::UpdateTextureData: upload the requested sub-rectangle via bgfx::updateTexture2D (Texture::Update2D). Validates the JS-controlled rect against the mip extents, sizes the copy with bgfx::calcTextureSize (no bimg dependency, so it also works in no-image-loading builds), and mirrors the vertical flip the base texture upload applies so the sub-rect lines up on top-left-origin backends (e.g. D3D11). - Re-enable the "Test updateTextureData" validation test. Pairs with the Babylon.js change (engine.name = "Native" so name-gated WebGL _gl access skips Native, plus the updateTextureData override). CI stays red until a babylonjs npm with that change is published and the dependency bumped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Paired engine PR: BabylonJS/Babylon.js#18567
What
Integration branch combining the four native-engine fixes below (each also exists as its own focused
PR — those remain the review units). Opened so combined CI / testing can validate the cumulative
effect and the full set of validation tests they re-enable.
depthCullingState.depthTeston the native engine.dds/.ktx/.ktx2cubemaps + spherical harmonicsNativeEngine::UpdateTextureData(+ engine.name "Native")Validation tests re-enabled (10)
Built
babylon.max.jsfrom the paired Babylon.js branch and ran the Playground validation suite(Win32 / D3D11). All 10 previously-excluded tests now pass pixel comparison:
Honor depthCullingState.depthTest (#1747)
Single-file
.dds/.ktx/.ktx2cubemap loading (#1748)Cube render targets (#1750)
updateTextureData (#1751)
CI
The validation suite uses the published
babylonjsnpm, which does not yet contain the paired JSchanges, so the re-enabled tests stay red on CI until a
babylonjsrelease with those changes shipsand the dependency is bumped here. Locally verified green against a
babylon.max.jsbuilt from thepaired Babylon.js branch. Draft until then.
Note
Draft integration branch — the four individual PRs are the units to review/merge.