134 Commits

Author SHA1 Message Date
luzhuang
97d8d610c7 chore: release v2.0.0-alpha.34 2026-06-02 22:43:24 +08:00
ChenMo
1472913872 feat(core): GPU instancing auto-batching (#2957)
* feat(core): add GPU instancing auto-batching with UBO-based per-instance data
2026-05-28 23:40:18 +08:00
cptbtptpbcptdtptp
9246f5ea97 chore: release v2.0.0-alpha.33 2026-05-14 16:27:48 +08:00
luzhuang
25ba6eb1cd chore: release v2.0.0-alpha.32 2026-05-12 19:59:16 +08:00
cptbtptpbcptdtptp
71efdd81e3 chore: release v2.0.0-alpha.31 2026-05-12 17:45:50 +08:00
zhuxudong
1bc2b102ad refactor(shader): migrate GLSL shaders to ShaderLab and clean up shader infrastructure(#2961)
* refactor(core): migrate shaders from core/shaderlib to shader package and clean up old files
2026-05-11 17:55:17 +08:00
AZhan
e19b764e1c fix(text): propagate WorldPosition dirty in _onRootCanvasModify when ReferenceResolutionPerUnit changes (#2981)
* fix(text): mark WorldPosition dirty after slot reallocation in _updateLocalData

Both Text (UI) and TextRenderer share a `bounds` getter that runs
`_updateLocalData` then checks `WorldPosition` dirty. `_updateLocalData`
internally `_freeTextChunks` + `_buildChunk → allocateSubChunk`, which
under PrimitiveChunk's first-fit + free-list-merge allocator can return
a slot previously owned by another renderer. `_buildChunk` writes UV
and color but never pos (pos is `_updatePosition`'s job), so the new
slot retains the previous owner's pos floats as residue.

Before this fix, when a path sets only `LocalPositionBounds` dirty
(e.g. `Text._onRootCanvasModify(ReferenceResolutionPerUnit)` in UI
Text), the bounds getter would:
  1. see LocalPositionBounds → run _updateLocalData (slot may swap)
  2. see WorldPosition not dirty → skip _updatePosition
  3. _setDirtyFlagFalse(Font) clear all dirty bits at once
The next _render also sees clean dirty bits and uploads the residue
pos to GPU — the renderer ends up rendering at someone else's old
world position. In practice this manifested as text glyphs jumping
to the wrong spot or appearing missing after UI tab switches that
free + reallocate chunk slots in the same frame.

Fix: force WorldPosition dirty at the end of _updateLocalData so the
contract "after this call, pos must be rewritten" is unconditionally
honored regardless of which caller invoked it.

Tests cover three layers:
  - dirty-flag invariant: _updateLocalData must leave WorldPosition
    dirty on exit
  - corrupted-slot: bounds getter with only LocalPositionBounds dirty
    rewrites pos even when the slot memory is poisoned
  - full slot-reuse repro: destroy a sibling renderer occupying a
    lower offset, then trigger bounds getter on the survivor — its
    pos must remain correct after the slot moves

Without the fix, all three regression tests fail with the survivor
rendering at the destroyed sibling's old position.

* chore: drop Chinese commentary from text dirty-flag fix

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(ui): destroy engine after regression describe block

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* refactor(text): move dirty propagation to input side

Previous fix added _setDirtyFlagTrue(WorldPosition) at the end of
_updateLocalData in both TextRenderer and UI Text. That treats the
output side as the place to declare invalidation, which conflates
two concerns: dirty flags should declare staleness from input
semantics, and update methods should be pure compute units that
don't propagate flags themselves.

Root cause is on the input side: _onRootCanvasModify(ReferenceResolutionPerUnit)
declared LocalPositionBounds dirty but not WorldPosition, even though
ReferenceResolutionPerUnit affects both local layout and the world
positions derived from it. Fix the declaration where the input
semantic event lives.

TextRenderer needs no change — it has no entry point that dirties
LocalPositionBounds without also dirtying WorldPosition (all setters
use DirtyFlag.Position which includes both).

Tests rewritten from white-box (poking private _dirtyFlag, hardcoded
enum values) to public-API integration tests that drive the bug
through uiCanvas.referenceResolutionPerUnit and assert observable
vertex position changes. The new tests fail without the fix
(maxDelta = 0, positions don't update) and pass with it.

* fix(text): include WorldVolume in dirty flag for ReferenceResolutionPerUnit change

Use DirtyFlag.Position (= LocalPositionBounds | WorldPosition | WorldVolume)
instead of the manual two-flag combination. ReferenceResolutionPerUnit
also affects world bounding volume; without the WorldVolume bit,
_updateBounds is skipped in the bounds getter and stale BoundingBox
leaks into frustum culling and raycasting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: chenmo.gl <chenmo.gl@antgroup.com>
2026-05-07 17:23:26 +08:00
chenmo.gl
ebd57aef47 chore: release v2.0.0-alpha.30 2026-04-21 11:22:09 +08:00
chenmo.gl
f9064e7fc5 chore: release v2.0.0-alpha.29 2026-04-17 22:52:07 +08:00
cptbtptpbcptdtptp
79b0698338 chore: release v2.0.0-alpha.28 2026-04-16 17:49:49 +08:00
cptbtptpbcptdtptp
fbd9f6f31d chore: release v2.0.0-alpha.27 2026-04-13 16:45:59 +08:00
cptbtptpbcptdtptp
a54642f5f0 chore: release v2.0.0-alpha.26 2026-04-10 10:19:14 +08:00
ChenMo
e9bea5b32a refactor: unify shader file extension from .gs/.gsl to .shader (#2951)
refactor: Align with Unity convention by using .shader as the standard extension
for Galacean shader files instead of .gs/.gsl.
2026-04-01 23:19:50 +08:00
cptbtptpbcptdtptp
b8b34ed3a4 chore: release v2.0.0-alpha.25 2026-03-23 21:48:31 +08:00
ChenMo
c3e2077d33 Unify Texture2D and TextureCube into single TextureLoader (#2937)
* refactor: unify Texture2D and TextureCube into single TextureLoader
2026-03-23 21:41:24 +08:00
cptbtptpbcptdtptp
2f88c2fab6 chore: release v2.0.0-alpha.24 2026-03-23 17:55:13 +08:00
GuoLei1990
1ff3635412 chore: release v2.0.0-alpha.23 2026-03-20 21:20:51 +08:00
GuoLei1990
026b8fbd10 chore: release v2.0.0-alpha.22 2026-03-20 21:08:35 +08:00
GuoLei1990
ba694802aa chore: release v2.0.0-alpha.21 2026-03-20 21:05:45 +08:00
GuoLei1990
ec924d5783 chore: release v2.0.0-alpha.20 2026-03-20 20:57:58 +08:00
cptbtptpbcptdtptp
4213f7a0f5 chore: release v2.0.0-alpha.19 2026-03-20 16:02:26 +08:00
cptbtptpbcptdtptp
31089dc0a6 Merge remote-tracking branch 'origin/main' into feat/MCode 2026-03-20 15:50:21 +08:00
AZhan
d79647a9ae fix: text dirty flag set error (#2931) 2026-03-20 15:36:57 +08:00
cptbtptpbcptdtptp
9d308ee8cc chore: release v2.0.0-alpha.18 2026-03-19 17:46:36 +08:00
cptbtptpbcptdtptp
d61eb7627b chore: release v2.0.0-alpha.17 2026-03-19 10:35:18 +08:00
cptbtptpbcptdtptp
e590f0ecbd chore: release v2.0.0-alpha.16 2026-03-18 18:02:59 +08:00
AZhan
886dda635d Fix compont props clone bug (#2926)
* fix: compontont props clone
2026-03-18 11:11:43 +08:00
cptbtptpbcptdtptp
26f35abacd chore: release v2.0.0-alpha.15 2026-03-17 19:21:25 +08:00
AZhan
57fdddb599 Unify Signal event mechanism with structured binding support (#2921)
* feat: unify signal event mechanism with structured binding support
2026-03-16 14:54:49 +08:00
cptbtptpbcptdtptp
fbc79fe85e chore: release v2.0.0-alpha.14 2026-03-16 12:14:57 +08:00
AZhan
85364f285f Remove useless code (#2922)
* feat: remove useless code
2026-03-16 10:49:28 +08:00
GuoLei1990
5073881d6c chore: release v2.0.0-alpha.13 2026-03-14 00:38:50 +08:00
GuoLei1990
0674811b6a chore: release v2.0.0-alpha.12 2026-03-13 00:01:21 +08:00
GuoLei1990
9bd6253456 chore: release v2.0.0-alpha.11 2026-03-12 23:28:53 +08:00
GuoLei1990
a36d6526de chore: release v2.0.0-alpha.10 2026-03-12 21:09:58 +08:00
cptbtptpbcptdtptp
744deee2d3 chore: release v2.0.0-alpha.9 2026-03-11 20:21:28 +08:00
AZhan
a49884386b Fix setting the font to null will trigger an error (#2917)
* fix: setting the font to null will trigger an error
2026-03-11 20:17:41 +08:00
GuoLei1990
3c8617940b chore: release v2.0.0-alpha.8 2026-03-11 00:42:34 +08:00
cptbtptpbcptdtptp
76aacb50df chore: release v2.0.0-alpha.7 2026-03-10 21:02:44 +08:00
GuoLei1990
6dbef4aa9b chore: release v2.0.0-alpha.6 2026-03-10 11:21:20 +08:00
cptbtptpbcptdtptp
e237cdcdb4 chore: release v2.0.0-alpha.5 2026-03-03 18:40:53 +08:00
GuoLei1990
5619f77b3d chore: release v2.0.0-alpha.4 2026-03-02 23:21:15 +08:00
GuoLei1990
8882bca90f chore: release v2.0.0-alpha.3 2026-03-02 22:47:31 +08:00
ChenMo
70453db6ab Add characterSpacing and change spacing units to em (#2908)
feat: Add characterSpacing and change spacing units to em
2026-03-01 21:19:50 +08:00
ym2050
8e84ff8352 Add camera-based event filtering for WorldSpace UICanvas (#2870)
* fix(ui): add eventCamera support for WorldSpace UICanvas (#2793)
2026-02-28 18:58:01 +08:00
ChenMo
c420cf0f24 Deferred destruction for EngineObject during frame processing (#2894)
* fix: prevent crash when destroying entity in physics event callbacks
2026-02-25 17:46:37 +08:00
cptbtptpbcptdtptp
d68166b43e chore: release v2.0.0-alpha.2 2026-01-28 20:47:09 +08:00
cptbtptpbcptdtptp
6a8058be2e chore: release v2.0.0-alpha.1 2026-01-27 20:29:40 +08:00
cptbtptpbcptdtptp
78b06f9808 chore: release v2.0.0-alpha.0 2026-01-27 15:14:46 +08:00
GuoLei1990
39dcd8a49d chore: release v1.6.13 2025-12-29 13:25:18 +08:00