Add native cube render target support (re-enables 2 shadow-with-instances tests)#1750
Draft
bkaradzic-microsoft wants to merge 1 commit into
Draft
Conversation
…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>
This was referenced Jun 11, 2026
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#18561
What
Implements cube render targets on the native engine so
ReflectionProbeandpoint-light cube shadow maps render instead of crashing on the null WebGL
context. Pairs with the Babylon.js change that adds the JS-side overrides.
Changes
Plugins/NativeEngine/Source/NativeEngine.cppInitializeTexture: optionalisCubeparam →Texture::CreateCube.CreateFrameBuffer: optionallayerparam so the color attachment targetsa single cube face (
bgfx::Attachmentlayer). The JS side creates oneframebuffer per face and binds the matching one per face.
Apps/Playground/Scripts/config.json: re-enables "Shadows with instances inleft/right handed system" (previously excluded as crash/hang).
CI
The validation suite uses the published
babylonjsnpm, which does not yetcontain the paired JS overrides, so the re-enabled tests stay red until a
babylonjsrelease with the Babylon.js change ships and the dependency isbumped here. Draft until then.
Verified locally
Built against a local
babylon.max.jswith the paired change: the twore-enabled tests pass and there are no regressions in post-process / 2D
render-target tests.